Method SetLimit
SetLimit(Int32)
Sets the limit of this buffer.
If the current position in the buffer is in excess of
newLimit
then, on returning from this call, it will have
been adjusted to be equivalent to newLimit
. If the mark
is set and is greater than the new limit, then it is cleared.
Declaration
public Buffer SetLimit(int newLimit)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | newLimit | The new limit value; must be non-negative and no larger than this buffer's capacity |
Returns
Type | Description |
---|---|
Buffer | This buffer |