C#将内容加载到word上,怎么换行?
现在显示结果: “1、XXX 2、XXXX 3、XXX 4、XXX"
要求显示为:1.XXX
2.XXXX
.....
代码:
int order = 1;
for (int i = 0; i < accessories.Rows.Count; i++) {
this.lalAffix.Text += Convert.ToString(order++) + "、" + accessories.Rows[i]["accessoriesName"].ToString().Split('.')[0];
}
this.lalAffix.Text += Convert.ToString(order++) + "、" + accessories.Rows[i]["accessoriesName"].ToString().Split('.')[0];改为:
this.lalAffix.Text += Convert.ToString(order++) + "、" + accessories.Rows[i]["accessoriesName"].ToString().Split('.')[0]+"\r\n";看看得行不
这些都试啦没有用