MemoryStream.Read Method
Reads a block of bytes from the current stream and writes the data to buffer.
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Syntax
public override int Read (
bytebuffer,
intoffset,
intcount
)
Parameters
- buffer
When this method returns, contains the specified byte array with the values between offset and (offset + count - 1) replaced by the characters read from the current stream. - offset
The byte offset in buffer at which to begin reading. - count
The maximum number of bytes to read.
Return Value
The total number of bytes written into the buffer. This can be less than the number of bytes requested if that number of bytes are not currently available, or zero if the end of the stream is reached before any bytes are read.
Version Information
Available in the .NET Micro Framework versions 3.0, 4.0, and 4.1.