winform问题,怎样把多行输入的textbox的每一行,作为一个list的item添加进去? 谢谢我是这样想的1,怎样判断textbox里共有多少行?2,怎样取到每一行的值,并添加到listbox 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 textBox.Lines 这个数组里面有你要的东西 1.textBox1.Lines.Length2.for(int i=0;i<textBox1.Lines.Length;i++){listBox.Items.Add(textBox1.Lines[i]);} 1,怎样判断textbox里共有多少行?textBox1.Lines.Length2,怎样取到每一行的值,并添加到listboxstring[] tempArray = new string [textBox1.Lines.Length];tempArray = textBox1.Lines;for(int counter=0; counter < tempArray.Length;counter++){ list.Items.Add(tempArray[counter]);} C#开发桌面程序分层问题 有关航班查询问题(急) DataSet是在内存中存储数据库中的全部数据吗? 关于c#操作excel的问题 [急,在线等]一个关于构造函数传参的问题 多线程的问题,怎么样使多线程并发 为什么Application.Exit()不起作用 请教我能不能看到asp.net网页啊? wpf datagrid间隔色+IsMouseOver触发器变色无效 事件问题??? ◆◇◆ 如何使用 C# 编写扩展存储过程? ◆◇◆ 关于注册表问题
{
listBox.Items.Add(textBox1.Lines[i]);
}
textBox1.Lines.Length
2,怎样取到每一行的值,并添加到listbox
string[] tempArray = new string [textBox1.Lines.Length];
tempArray = textBox1.Lines;
for(int counter=0; counter < tempArray.Length;counter++)
{
list.Items.Add(tempArray[counter]);
}