sorry!在一个字符串后加\\n,我以前试过了,如下:
FileStream fs=new FileStream("d:\\"+"hello"+".txt",FileMode.OpenOrCreate,FileAccess.Write);
byte [] bye=System.Text.Encoding.BigEndianUnicode.GetBytes("hello1\\n");
fs.Write(bye,0,bye.Length);
fs.Flush();
bye=System.Text.Encoding.BigEndianUnicode.GetBytes("hello2"+"\\n");
fs.Write(bye,0,bye.Length);
fs.Flush();
fs.Close();
结果,hello1和hello2在同一行
请指教!Thank you very much!