The lines in the .txt file are:
stroka1 stroka2 etc.
I need to insert a space at the beginning of each line, that is, make a пробелstroka1 .
string[] file = File.ReadAllLines(@"C:\\\\123.txt"); foreach (var lines in file) { string str = lines.Insert(0, " "); Console.WriteLine(lines); File.WriteAllText(@"C:\\\\123.txt", str); } Why is a space not inserted before each line?