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

◆ CopyTo() [2/2]

void System.Collections.Generic.Stack< T >.CopyTo ( T[] array,
int arrayIndex )
inline

Implements System.Collections.Generic.ICollection< T >.

Definition at line 153 of file Stack.cs.

154 {
155 if (array == null)
156 {
157 throw new ArgumentNullException("array");
158 }
159 if (arrayIndex < 0 || arrayIndex > array.Length)
160 {
161 throw new ArgumentOutOfRangeException("arrayIndex", arrayIndex, System.SR.ArgumentOutOfRange_Index);
162 }
163 if (array.Length - arrayIndex < _size)
164 {
166 }
167 int num = 0;
168 int num2 = arrayIndex + _size;
169 while (num < _size)
170 {
171 array[--num2] = _array[num++];
172 }
173 }
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string Argument_InvalidOffLen
Definition SR.cs:22
Definition SR.cs:7

References System.Collections.Generic.Stack< T >._array, System.Collections.Generic.Stack< T >._size, System.SR.Argument_InvalidOffLen, System.SR.ArgumentOutOfRange_Index, System.array, and System.arrayIndex.