Streams: The Bread and Butter of I/O

The notion of a stream is the lowest you can go in terms of .NET’s managed code I/O system. Figure 28.4 shows an overview of the members of the Stream class.


FIGURE 28.4 The Stream class seen through Object Browser.

First of all, let’s discuss a stream’s potentially supported capabilities, which include the capability to read from and write to a stream and also the capability to seek. A seek operation basically moves a cursor—as seen through the Position property—that indicates where the next read or write operation will take place. Another capability is whether an operation on a stream is subject to timeout. ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.