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

◆ CopyTo() [1/2]

void ICollection. System.Security.AccessControl.GenericAcl.CopyTo ( Array array,
int index )
inlineprivateinherited

Implements System.Collections.ICollection.

Definition at line 27 of file GenericAcl.cs.

28 {
29 if (array == null)
30 {
31 throw new ArgumentNullException("array");
32 }
33 if (array.Rank != 1)
34 {
35 throw new RankException(System.SR.Rank_MultiDimNotSupported);
36 }
37 if (index < 0)
38 {
39 throw new ArgumentOutOfRangeException("index", System.SR.ArgumentOutOfRange_NeedNonNegNum);
40 }
41 if (array.Length - index < Count)
42 {
43 throw new ArgumentOutOfRangeException("array", System.SR.ArgumentOutOfRange_ArrayTooSmall);
44 }
45 for (int i = 0; i < Count; i++)
46 {
47 array.SetValue(this[i], index + i);
48 }
49 }
static string ArgumentOutOfRange_ArrayTooSmall
Definition SR.cs:74
static string Rank_MultiDimNotSupported
Definition SR.cs:1826
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7

References System.SR.ArgumentOutOfRange_ArrayTooSmall, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.array, System.Security.AccessControl.GenericAcl.Count, System.index, and System.SR.Rank_MultiDimNotSupported.