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

◆ CopyTo()

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

Implements System.Collections.ICollection.

Definition at line 413 of file NameObjectCollectionBase.cs.

414 {
415 if (array == null)
416 {
417 throw new ArgumentNullException("array");
418 }
419 if (array.Rank != 1)
420 {
421 throw new ArgumentException(System.SR.Arg_MultiRank, "array");
422 }
423 if (index < 0)
424 {
425 throw new ArgumentOutOfRangeException("index", index, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index);
426 }
427 if (array.Length - index < _entriesArray.Count)
428 {
430 }
431 IEnumerator enumerator = GetEnumerator();
432 while (enumerator.MoveNext())
433 {
434 array.SetValue(enumerator.Current, index++);
435 }
436 }
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._entriesArray, System.SR.Arg_InsufficientSpace, System.SR.Arg_MultiRank, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index, System.array, System.Collections.ArrayList.Count, System.Runtime.Serialization.Dictionary, System.Collections.Specialized.NameObjectCollectionBase.GetEnumerator(), and System.index.