I am trying to read all lines from the file, however I am getting some unexpected results, code:
var readLines = File.ReadLines(file);
foreach (var line in readLines)
{
//line = "T\0e\0s\0t\0"
}
File contents:
Test
If I will do line.Replace("\0", "")
then it works fine however I would like to understand why this is happening and how I can get correct value from the file using ReadLines?