Stream Methods

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The Stream type exposes the following members.

  Name Description
Public method Close Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
Public method Dispose()()()() Releases all resources used by the Stream.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Stream and optionally releases the managed resources.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Cleans up resources. (Overrides Object..::..Finalize()()()().)
Public method Flush When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Read When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
Public method ReadByte Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Public method Seek When overridden in a derived class, sets the position within the current stream.
Public method SetLength When overridden in a derived class, sets the length of the current stream.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Write When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
Public method WriteByte Writes a byte to the current position in the stream and advances the position within the stream by one byte.
Top
Show: