Files and the Console in C#: ReadLine, File, Path, Directory, using and Encoding
Why does the same text take 15 and 18 bytes? UTF-8 and the BOM, Console.ReadLine that can return null, Path.Combine versus Path.Join, one-line reads and writes with File and Directory, relative paths and the working directory, and the empty file of a StreamWriter that was never disposed.
7 Nov 2026
·
9 min
·
8