Search notes:

System.IO.Stream (abstract class)

System.IO.Stream is an abstract base class for all streams. A stream represents a sequence of bytes.
Compare System.IO.Stream with (the abstract) class System.IO.TextWriter which is used to write sequences of characters.

Fundamental operations on streams

The two fundumental operations on streams are:
Some streams have a third fundamental operation: moving to a specific location within the stream. A typical example for such a stream is a file. An example, where moving to a specific position doesn't make lot of sense is a TCP/IP connection.
In order to find out which operations are possible, a stream provides the following three methods:

See also

This example uses a stream to write an XML document.

Index