方法一:測試
FileStream textFile = File.Open(@"F:\程序\新手測試\linqApplication1\linqApplication1\IO.txt", FileMode.Append); StreamWriter sw = new StreamWriter(textFile); sw.WriteLine("11111"); sw.WriteLine(); sw.Close();
方法二:spa
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();