Share via


Stream Members

The following tables list the members exposed by the Stream type.

Protected Constructors

Name Description
Protected Method Stream Initializes a new instance of the Stream class.

Public Properties

Name Description
Public Property CanRead When overridden in a derived class, this property gets a value that indicates whether the current Stream object supports reading.
Public Property CanSeek When overridden in a derived class, this property gets a value that indicates whether the current Stream object supports seeking.
Public Property CanTimeout When overridden in a derived class, this property gets a value that indicates whether the current Stream object can have a time-out.
Public Property CanWrite When overridden in a derived class, this property gets a value that indicates whether the current Stream object supports writing.
Public Property Length When overridden in a derived class, this property gets the length of the current Stream object, in bytes.
Public Property Position When overridden in a derived class, this property gets or sets the current position within the current Stream object.
Public Property ReadTimeout Gets or sets the amount of time a read operation blocks waiting for data.
Public Property WriteTimeout Gets or sets the amount of time a write operation blocks waiting for data.

Public Methods

Name Description
Public Method Close Closes the current Stream object and releases any resources (such as sockets and file handles) associated with it.
Public Method Dispose Overloaded. Releases all resources used by the current Stream object.
Public Method Equals (Inherited from Object.)
Public Method Flush When overridden in a derived class, this method clears all buffers for the current Stream object and causes any buffered data to be written to the underlying device.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Read When overridden in a derived class, this method reads a sequence of bytes from the current Stream object and advances the position within the stream by the number of bytes tbat are read.
Public Method ReadByte Reads a byte from the current Stream object and advances the position within the stream by one byte, or returns -1 if the end of the stream has been reached.
Public Method ReferenceEquals (Inherited from Object.)
Public Method Seek When overridden in a derived class, this method sets the position within the current Stream object.
Public Method SetLength When overridden in a derived class, this method sets the length of the current Stream object.
Public Method ToString (Inherited from Object.)
Public Method Write When overridden in a derived class, this method writes a sequence of bytes to the current Stream object and advances the current position within this stream by the number of bytes written to it.
Public Method WriteByte Writes a specified byte to the current position in the current Stream object and advances the position within the stream by one byte.

Protected Methods

Name Description
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

Stream Class
System.IO Namespace