Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EnsureCapacity()

int System.Collections.Generic.Queue< T >.EnsureCapacity ( int capacity)
inline

Definition at line 399 of file Queue.cs.

400 {
401 if (capacity < 0)
402 {
403 throw new ArgumentOutOfRangeException("capacity", capacity, SR.ArgumentOutOfRange_NeedNonNegNum);
404 }
405 if (_array.Length < capacity)
406 {
407 Grow(capacity);
408 }
409 return _array.Length;
410 }
void Grow(int capacity)
Definition Queue.cs:412

References System.Collections.Generic.Queue< T >._array, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.capacity, and System.Collections.Generic.Queue< T >.Grow().