Method Resize
Resize(int)
Reallocates the underlying buffer if necessary. WriteCount is reset only if Capacity changes.
Declaration
public void Resize(int newCapacity)
Parameters
Type | Name | Description |
---|---|---|
int | newCapacity | The new value for Capacity. Can be 0. |
Remarks
When reallocation occurs, data is not copied over from the previous buffer. After a call to Resize, Capacity is always equal to the given newCapacity. Resize(0) will deallocate the underlying buffer.