Table of Contents

Method DecreaseCapacity

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

DecreaseCapacity(int)

Decreases the capacity of this IResizeableBuffer<T> by the specified decrement (up to the current capacity).

public int DecreaseCapacity(int decrement)

Parameters

decrement int

How much to decrease the capacity by.

Returns

int

The actual amount by which the capacity was decreased.

Remarks

If the capacity is lower than the current Count, elements are removed from the buffer until the capacity is reached.

Exceptions

ArgumentOutOfRangeException

The decrement is negative.