Console.WriteLine(test.Replace("\n", ""));
returns all numbers for me. When dealing with linebreaks you must be aware that newline may be \r\n
, it depends on platform. In this case you should use this:
test.Replace("\r\n", "")
// or better:
test.Replace(Environment.NewLine, "")