I want to write a string into a file. My problem is that I cannot add new lines into the file.
using (System.IO.StreamWriter writer = new System.IO.StreamWriter(
Maybe platform issues? Look at Difference between "\n" and Environment.NewLine Try Environment.NewLine
writer.Write(String.Format("{0}{2}{2}{1}", this.currentRealWorldObj.Title, this.currentRealWorldObj.Description,Environment.NewLine));
There is a specific WriteLine function for this.
For example:
writer.WriteLine(this.currentRealWorldObj.Title);
writer.WriteLine();
writer.WriteLine();
writer.WriteLine(this.currentRealWorldObj.Description);