I have the following code:
string test = @"1
2
3";
This line:
Console.WriteLine(test.Replace("\n", "")); //3
prints "3", instead of "123", which is what I expected. Why does this method return only the last line of my string, and how can I otherwise remove all new-lines?