Method GetChar
GetChar()
Returns the char at the current position and increases the position by 2.
The 2 bytes starting at the current position are composed into a char according to the current byte order and returned.
Declaration
public abstract char GetChar()
Returns
Type | Description |
---|---|
System.Char | the char at the current position. |
Exceptions
Type | Condition |
---|---|
BufferUnderflowException | if the position is greater than |
GetChar(Int32)
Returns the char at the specified index.
The 2 bytes starting from the specified index are composed into a char according to the current byte order and returned. The position is not changed.
Declaration
public abstract char GetChar(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | the index, must not be negative and equal or less than |
Returns
Type | Description |
---|---|
System.Char | the char at the specified index. |