.NET Framework Class Library
MemoryStream Methods
Public Methods
(see also
Protected Methods
)
| Name | Description | |
|---|---|---|
| BeginRead | Begins an asynchronous read operation. (Inherited from Stream.) |
| BeginWrite | Begins an asynchronous write operation. (Inherited from Stream.) |
| Close | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. (Inherited from Stream.) |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
| Dispose | Overloaded. |
| EndRead | Waits for the pending asynchronous read to complete. (Inherited from Stream.) |
| EndWrite | Ends an asynchronous write operation. (Inherited from Stream.) |
| Equals | Overloaded. Determines whether two Object instances are equal. (Inherited from Object.) |
| Flush | Overridden. Overrides Stream.Flush so that no action is performed. |
| GetBuffer | Returns the array of unsigned bytes from which this stream was created. |
| GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
| GetType | Gets the Type of the current instance. (Inherited from Object.) |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
| Read | Overridden. Reads a block of bytes from the current stream and writes the data to buffer. |
| ReadByte | Overridden. Reads a byte from the current stream. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (Inherited from Object.) |
| Seek | Overridden. Sets the position within the current stream to the specified value. |
| SetLength | Overridden. Sets the length of the current stream to the specified value. |
| Synchronized | Creates a thread-safe (synchronized) wrapper around the specified Stream object. (Inherited from Stream.) |
| ToArray | Writes the stream contents to a byte array, regardless of the Position property. |
| ToString | Returns a String that represents the current Object. (Inherited from Object.) |
| Write | Overridden. Writes a block of bytes to the current stream using data read from buffer. |
| WriteByte | Overridden. Writes a byte to the current stream at the current position. |
| WriteTo | Writes the entire contents of this memory stream to another stream. |
Protected Methods
| Name | Description | |
|---|---|---|
| CreateWaitHandle | Allocates a WaitHandle object. (Inherited from Stream.) |
| Dispose | Overloaded. Overridden. |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
| MemberwiseClone | Overloaded. (Inherited from MarshalByRefObject.) |
See Also
Reference
MemoryStream ClassSystem.IO Namespace
Other Resources
File and Stream I/OHow to: Read Text from a File
How to: Write Text to a File