【发布时间】:2012-10-29 13:27:16
【问题描述】:
我有一个问题,如何拆分字符串并让拆分后的字符串逐行显示?
字符串:
What is "that" ENUM "No", "Yes", "OK", "Cancel";
我想要DataTable:
Name Type Comment
"that" ENUM "No" // all of them
"Yes" // should be
"OK" // in the same
"Cancel" // cell
必须是string[] tmpList = tmp.Split(new Char[] { ' ',',', ';' }, StringSplitOptions.RemoveEmptyEntries);,然后是attributeDEF.Rows.Add(new object[] { tmpList1[1], tmpList1[2], tmpList1[3] + "\n" + tmpList[a]+ "\n"});
谁能给我一个线索?
【问题讨论】:
-
分割字符串?
is "that"在哪里消失了? -
您发布的代码有什么问题?这几乎就是你想要的不是吗?
-
对不起,而不是“什么”是“那个”