页: 1 我的“C:档案”。
1;aaa
2;bbb
3;ccc
4;ddd
and so on. (each number and text in separate line) My code:
FileStream spis = File.Open("C:\file.txt", FileMode.Open, FileAccess.Read);
StreamReader yaRead = new StreamReader(spis);
string yaView = yaRead.ReadToEnd();
yaRead.Close();
spis.Close();
String[] yaArray = yaView.Split(new char[] { ; });
foreach (string ya in yaArray)
{
listView1.Items.Add(ya);
}
成果
1
aaa
bbb
(...)
页: 1 请帮助我确定这一点。