【发布时间】:2014-09-18 18:35:56
【问题描述】:
ListBox box = GetListBox(); //placeholder for the sample
string s = "123456776543219898989";
char[] c = s.ToCharArray();
for(int i=0;i<c.Length;i+=7)
{
box.Items.Add(new string(c, i, 7));
}
这是分隔文本的快速方法。
【问题讨论】:
-
您对哪一部分有问题?这个答案可能会做你想做的事情:stackoverflow.com/a/18987605/507793
-
通过“发布一些代码”,psoshmo 并不是要用答案覆盖您原来的问题...