StreamReader sr;
string line;
sr = new StreamReader("d:/t.txt");
line = sr.ReadLine();
MessageBox.Show(line);
我在t.txt 写上 卧室在 三个字
为什么在messagebox里总是空 没有汉字啊?
string line;
sr = new StreamReader("d:/t.txt");
line = sr.ReadLine();
MessageBox.Show(line);
我在t.txt 写上 卧室在 三个字
为什么在messagebox里总是空 没有汉字啊?
少了Encoding.无法判断文件编码