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

◆ CopyTo()

void System.Collections.Specialized.ListDictionary.CopyTo ( Array array,
int index )
inline

Implements System.Collections.ICollection.

Definition at line 382 of file ListDictionary.cs.

383 {
384 if (array == null)
385 {
386 throw new ArgumentNullException("array");
387 }
388 if (index < 0)
389 {
390 throw new ArgumentOutOfRangeException("index", index, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index);
391 }
392 if (array.Length - index < count)
393 {
395 }
396 for (DictionaryNode next = head; next != null; next = next.next)
397 {
398 array.SetValue(new DictionaryEntry(next.key, next.value), index);
399 index++;
400 }
401 }
static string ArgumentOutOfRange_NeedNonNegNum_Index
Definition SR.cs:18
static string Arg_InsufficientSpace
Definition SR.cs:26
Definition SR.cs:7

References System.SR.Arg_InsufficientSpace, System.SR.ArgumentOutOfRange_NeedNonNegNum_Index, System.array, System.Collections.Specialized.ListDictionary.count, System.Collections.Specialized.ListDictionary.head, System.index, and System.Collections.Specialized.ListDictionary.DictionaryNode.next.

Referenced by System.Collections.Specialized.HybridDictionary.CopyTo().