方法一:
FileStream textFile = File.Open(@"F:\程序\新手测试\linqApplication1\linqApplication1\IO.txt", FileMode.Append); StreamWriter sw = new StreamWriter(textFile); sw.WriteLine("11111"); sw.WriteLine(); sw.Close();
方法二:
FileStream textFile = File.Open(@"F:\程序\新手测试\linqApplication1\linqApplication1\IO.txt", FileMode.Append); byte[] info = Encoding.Default.GetBytes("11111"); textFile.Write(info, 0, info.Length); textFile.Close();