110,545
社区成员
发帖
与我相关
我的任务
分享
我也遇到了同样的问题,已解决。。
string str1 = File.ReadAllText(@"E:\tt.txt");
string path = @"E:\ss.txt";
if (File.Exists(path))
string readText = File.ReadAllText(path);
string str1 = File.ReadAllText("tt.txt");
或者使用 StreamReader reader = new StreamReader("E:\\tt.txt",Encoding.Default);