string path = @"d:\MyTest.txt";
StreamWriter sw = new StreamWriter(@"d:\mytesttest.txt") ;
StreamReader sr = new StreamReader(path) ;
string cc=sr.ReadToEnd();
sw.Write( cc);
写入之后,sw中的数据并不完全是sr中的数据, sr是纯文本文件,比较大.
3 个解决方案
#1
糊涂,忘记了sw.close()和sr.close()
#2
这么说现在没有问题咯
#3
最后添加sw.Flush();和sw.Close();
#1
糊涂,忘记了sw.close()和sr.close()
#2
这么说现在没有问题咯
#3
最后添加sw.Flush();和sw.Close();