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

◆ CopyTo()

void ICollection. System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.CopyTo ( Array array,
int index )
inlineprivate

Implements System.Collections.ICollection.

Definition at line 101 of file NameObjectCollectionBase.cs.

102 {
103 if (array == null)
104 {
105 throw new ArgumentNullException("array");
106 }
107 if (array.Rank != 1)
108 {
109 throw new ArgumentException(System.SR.Arg_MultiRank, "array");
110 }
111 if (index < 0)
112 {
113 throw new ArgumentOutOfRangeException("index", index, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index);
114 }
115 if (array.Length - index < _coll.Count)
116 {
118 }
119 IEnumerator enumerator = GetEnumerator();
120 while (enumerator.MoveNext())
121 {
122 array.SetValue(enumerator.Current, index++);
123 }
124 }
static string Arg_MultiRank
Definition SR.cs:24
static string ArgumentOutOfRange_NeedNonNegNum_Index
Definition SR.cs:18
static string Arg_InsufficientSpace
Definition SR.cs:26
Definition SR.cs:7

References System.Collections.Specialized.NameObjectCollectionBase.KeysCollection._coll, System.SR.Arg_InsufficientSpace, System.SR.Arg_MultiRank, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index, System.array, System.Collections.Specialized.NameObjectCollectionBase.Count, System.Runtime.Serialization.Dictionary, System.Collections.Specialized.NameObjectCollectionBase.KeysCollection.GetEnumerator(), and System.index.