MemoryStream Members

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

Public Constructors

Name Description
Public Method MemoryStream Overloaded. Creates a instance of the MemoryStream class.

Public Properties

Name Description
Public Property CanRead Gets a Boolean value indicating whether the current stream supports reading.
Public Property CanSeek Gets a Boolean value indicating whether the current stream supports seeking.
Public Property CanTimeout (Inherited from Stream.)
Public Property CanWrite Gets a Boolean value indicating whether the current stream supports writing.
Public Property Capacity Gets or sets the number of bytes allocated for this memory stream.
Public Property Length Gets the length of the stream in bytes.
Public Property Position Gets or sets the current position within the stream.

Public Methods

Name Description
Public Method Close Closes a stream so that it cannot be written to or read from.
Public Method Dispose (Inherited from Stream.)
Public Method Equals (Inherited from Object.)
Public Method Flush Flushes the contents of the stream.
Public Method GetBuffer Retrieves the contents of the memory buffer associated with this stream.
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Read Reads a block of bytes from the stream and writes the data to buffer.
Public Method ReadByte Reads a byte from the current stream.
Public Method ReferenceEquals (Inherited from Object.)
Public Method Seek Sets the current position within the stream to the specified value.
Public Method SetLength Sets the length, in bytes, of the current stream to the specified value.
Public Method ToArray Writes the stream contents to a byte array, regardless of the value of the Position property.
Public Method ToString (Inherited from Object.)
Public Method Write Writes a block of bytes to the stream using data read from buffer.
Public Method WriteByte Writes a byte to the current stream at the current position.
Public Method WriteTo Writes the entire contents of the current memory stream to another stream.

Protected Methods

Name Description
Protected Method Finalize (Inherited from Object.)
Protected Method MemberwiseClone (Inherited from Object.)

See Also

Reference

MemoryStream Class
System.Ext.IO Namespace