读写文件一开始看似困难,其实内容并不多。
例如:
string path = @"D:\01.txt"; FileStream fs = new FileStream(path,FileMode.Create); StreamWriter sw = new StreamWriter(fs); sw.WriteLine("aabbb"); sw.WriteLine("bb"); sw.Close();