Method SetCapacity
- Namespace
- Gamelogic.Extensions.Algorithms
- Assembly
- Gamelogic.Extensions.dll
SetCapacity<T>(IResizeableBuffer<T>, int)
Sets the capacity of the buffer to the specified value.
public static void SetCapacity<T>(this IResizeableBuffer<T> buffer, int newCapacity)
Parameters
buffer
IResizeableBuffer<T>The buffer to set the capacity of.
newCapacity
intThe new capacity of the buffer.
Type Parameters
T
The type of elements in the buffer.
Exceptions
- ArgumentOutOfRangeException
The new capacity is negative.