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