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

◆ ValidateCopyToArguments()

static void System.Collections.CollectionHelpers.ValidateCopyToArguments ( int sourceCount,
Array array,
int index )
inlinestaticpackage

Definition at line 7 of file CollectionHelpers.cs.

8 {
9 if (array == null)
10 {
11 throw new ArgumentNullException("array");
12 }
13 if (array.Rank != 1)
14 {
16 }
17 if (array.GetLowerBound(0) != 0)
18 {
20 }
21 if (index < 0 || index > array.Length)
22 {
23 throw new ArgumentOutOfRangeException("index", System.SR.ArgumentOutOfRange_NeedNonNegNum);
24 }
25 if (array.Length - index < sourceCount)
26 {
28 }
29 }
static string Arg_ArrayPlusOffTooSmall
Definition SR.cs:16
static string Arg_NonZeroLowerBound
Definition SR.cs:14
static string Arg_RankMultiDimNotSupported
Definition SR.cs:18
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.SR.Arg_ArrayPlusOffTooSmall, System.SR.Arg_NonZeroLowerBound, System.SR.Arg_RankMultiDimNotSupported, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, and System.index.

Referenced by System.Collections.ObjectModel.ReadOnlyDictionary< TKey, TValue >.CopyTo(), System.Collections.Specialized.SingleItemReadOnlyList.CopyTo(), and System.Collections.CollectionHelpers.CopyTo< T >().