Streams in .NET

A stream is an abstract representation of a sequence of bytes such as a file, an I/O device, or a TCP/IP socket. Through this abstraction, different devices can be accessed with the same process, and similar code can be used to read data from a file input stream, as can be used to read data from a network input stream, for example. Furthermore, the programmer’s need to worry about the actual physical mechanism of the device is removed.