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

◆ CopyTo() [1/2]

void ICollection. System.Collections.Generic.Stack< T >.CopyTo ( Array array,
int arrayIndex )
inlineprivate

Definition at line 175 of file Stack.cs.

176 {
177 if (array == null)
178 {
179 throw new ArgumentNullException("array");
180 }
181 if (array.Rank != 1)
182 {
184 }
185 if (array.GetLowerBound(0) != 0)
186 {
188 }
189 if (arrayIndex < 0 || arrayIndex > array.Length)
190 {
191 throw new ArgumentOutOfRangeException("arrayIndex", arrayIndex, System.SR.ArgumentOutOfRange_Index);
192 }
193 if (array.Length - arrayIndex < _size)
194 {
196 }
197 try
198 {
199 Array.Copy(_array, 0, array, arrayIndex, _size);
200 Array.Reverse(array, arrayIndex, _size);
201 }
202 catch (ArrayTypeMismatchException)
203 {
205 }
206 }
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string Argument_InvalidArrayType
Definition SR.cs:54
static string Arg_NonZeroLowerBound
Definition SR.cs:14
static string Arg_RankMultiDimNotSupported
Definition SR.cs:18
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.Arg_NonZeroLowerBound, System.SR.Arg_RankMultiDimNotSupported, System.SR.Argument_InvalidArrayType, System.SR.Argument_InvalidOffLen, System.SR.ArgumentOutOfRange_Index, System.array, System.arrayIndex, System.Array.Copy(), and System.Array.Reverse().