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

◆ List() [2/3]

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

Definition at line 181 of file List.cs.

182 {
183 if (capacity < 0)
184 {
185 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity, ExceptionResource.ArgumentOutOfRange_NeedNonNegNum);
186 }
187 if (capacity == 0)
188 {
190 }
191 else
192 {
193 _items = new T[capacity];
194 }
195 }
static readonly T[] s_emptyArray
Definition List.cs:89

References System.Collections.Generic.List< T >._items, System.capacity, System.Collections.Generic.List< T >.s_emptyArray, and System.ThrowHelper.ThrowArgumentOutOfRangeException().