MemoryStream.ReadByte Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Reads a byte from the current stream.
Assembly: mscorlib (in mscorlib.dll)
Return Value
Type: System.Int32The byte cast to a Int32, or -1 if the end of the stream has been reached.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The current stream instance is closed. |
This method overrides ReadByte.
If the read operation is successful, the current position within the stream is advanced by one byte. If an exception occurs, the current position within the stream is unchanged.
Show: