Last Updated: May 17, 2026
The System.IO.File class ships with a small set of one-call helpers that handle the most common file work: pull the whole file into a string, write a string back out, append a line to a log, dump bytes to disk. These methods open the file, do the read or write, and close the handle for you, which is why they read so cleanly. This lesson covers what each helper does, when the convenience comes at a real cost (huge files, partial reads, binary records), and how the async variants change the thread story without changing the API shape. Streams, which give you finer-grained control over how bytes move, are the subject of the _Streams_ lesson.