This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
BinaryReader Methods
The methods of the BinaryReader class are listed below. For a complete list of BinaryReader class members, see the BinaryReader Members topic.
Public:
Close |
Closes the current reader and releases the underlying stream. |
Equals (inherited from Object) |
Determines whether the specified Object is the same instance as the current Object. Subclasses are expected to override this method to support value equality (not reference equality). |
GetHashCode (inherited from Object) |
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType (inherited from Object) |
Gets the Type of the Object. |
PeekChar |
Returns the next available character without actually reading it from the input stream, and does not advance the byte or character position within the stream. |
Read |
Overloaded. Reads the next character from the underlying stream and advances the current position of the stream. |
ReadBoolean |
Reads a Boolean from the current stream. The current position of the stream is advanced by one byte. |
ReadByte |
Reads the next byte from the current stream and advances the current position of the stream by 1 byte. |
ReadBytes |
Reads count bytes from the current stream into a byte array, and advances the current position by count bytes. |
ReadChar |
Reads the next character from the current stream and advances the current position of the stream in accordance with the Encoding used and perhaps the particular character being read from the stream. |
ReadChars |
Reads count characters from the current stream, returns the data in a character array, and advances the current position in accordance with the Encoding used and perhaps the particular character being read from the stream. |
ReadDouble |
Reads a Double (an 8-byte floating point value) from the current stream and advances the current position of the stream by 8 bytes. |
ReadInt16 |
Reads a 2-byte signed integer from the current stream and advances the current position of the stream by 2 bytes. |
ReadInt32 |
Reads a 4-byte signed integer from the current stream and advances the current position of the stream by 4 bytes. |
ReadInt64 |
Reads an 8-byte signed integer from the current stream and advances the current position of the stream by 8 bytes. |
ReadSByte |
Reads a signed byte from this stream and advances the current position of the stream by one byte. |
ReadSingle |
Reads a Single (a 4-byte floating point value) from the current stream and advances the current position of the stream by 4 bytes. |
ReadString |
Reads a String from the current stream. The String is prefixed with the length, encoded as an integer 7 bits at a time. |
ReadUInt16 |
Reads a two-byte unsigned integer from the current stream and advances the position of the stream by two bytes. This uses little endian encoding. |
ReadUInt32 |
Reads a four-byte unsigned integer from the current stream and advances the position of the stream by four bytes. |
ReadUInt64 |
Reads an eight-byte unsigned integer from the current stream and advances the position of the stream by eight bytes. |
ToString (inherited from Object) |
Returns a String that represents the current Object. |
Protected:
FillBuffer |
Fills the buffer with the specified number of bytes read from the stream. |
Finalize (inherited from Object) |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by the Garbage Collector (GC). This method may be ignored by the runtime; therefore, necessary cleanup operations should be done elsewhere. |
MemberwiseClone (inherited from Object) |
Creates a shallow copy of the current Object. |
See Also
BinaryReader Class | System.IO Namespace