【发布时间】:2012-09-28 04:58:19
【问题描述】:
我想获得一个分配有StreamReader 的string[]。喜欢:
try{
StreamReader sr = new StreamReader("a.txt");
do{
str[i] = sr.ReadLine();
i++;
}while(i < 78);
}
catch (Exception ex){
MessageBox.Show(ex.ToString());
}
我可以做到但不能使用字符串[]。我想这样做:
MessageBox.Show(str[4]);
如果您需要更多信息,请随时询问,我会更新。 提前谢谢...
【问题讨论】:
标签: string c#-4.0 streamreader