| Author: Geetha 05 Sep 2008 | Member Level: Gold | Rating: Points: 2 |
using c# i am writing in a file. here i am using the new line character.
FileStream fs = new FileStream(@"d:\Temp\Test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter m_streamWriter = new StreamWriter(fs); m_streamWriter.BaseStream.Seek(0, SeekOrigin.End); m_streamWriter.WriteLine(DateTime.Now + " " + Message); m_streamWriter.WriteLine("\n ---------------------------------------------------------------------"); m_streamWriter.Flush(); m_streamWriter.Close(); fs.Dispose(); m_streamWriter.Dispose();
|
| Author: ANIL PANDEY 05 Sep 2008 | Member Level: Diamond | Rating: Points: 3 |
hi,
u can use the char(13) to insert the new line character in the string.
Char(13) represent the Enter key in the code..
Thanks
|
| Author: Kapil Deo Malhotra 05 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
Hi,
You can use "\n" also for the new line character.
Hope that helps
|