FileStream, BinaryReader, and BinaryWriter

The FileStream class exposes a stream around a file, supporting both synchronous and asynchronous methods. FileStream also is used to implement the standard in, standard out, and standard error streams. The File class is a utility class with static methods. Its primary use is to enable you to create FileStream objects that are based on file paths and the standard input, standard output, and standard error devices. File is used with FileStream.

The FileStream class can open a file in one of two modes: either synchronously or asynchronously, with significant performance consequences for both the synchronous methods (Read and Write) and the asynchronous methods (BeginRead and BeginWrite). The synchronous ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.