I have a simple string which has '\n' in it. It is supposed to be written into a file. For eg:
var s = new StringBuilder();
s.Append("hello");
s.Append("\n");
s.Append("betty");
s.Append("is");
s.Append("my");
s.Append("\n");
s.Append("name");
string str = s.ToString();
Console.WriteLine(str);
This string prints as expected:
hello bettyismy name
Now when I try to write this string in a file using the following:
var w = new StreamWriter(crcFilePath);
w.WriteLine(crcString);
w.Close();
The content of the file is:
hellobettyismyname
Any idea why it is ignoring the \n in the string.