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

◆ CopyTo() [4/4]

void System.Collections.Generic.Dictionary< TKey, TValue >.KeyCollection.CopyTo ( TKey[] array,
int index )
inline

Definition at line 341 of file Dictionary.cs.

342 {
343 if (array == null)
344 {
345 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
346 }
347 if (index < 0 || index > array.Length)
348 {
349 ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException();
350 }
351 if (array.Length - index < _dictionary.Count)
352 {
353 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall);
354 }
355 int count = _dictionary._count;
356 Entry[] entries = _dictionary._entries;
357 for (int i = 0; i < count; i++)
358 {
359 if (entries[i].next >= -1)
360 {
361 array[index++] = entries[i].key;
362 }
363 }
364 }
readonly Dictionary< TKey, TValue > _dictionary

References System.Collections.Generic.Dictionary< TKey, TValue >.KeyCollection._dictionary, System.array, System.count, System.index, System.ThrowHelper.ThrowArgumentException(), System.ThrowHelper.ThrowArgumentNullException(), and System.ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException().

Referenced by System.Collections.Generic.Dictionary< TKey, TValue >.KeyCollection.CopyTo(), System.Diagnostics.Process.GetEnvironmentVariablesBlock(), Microsoft.Xna.Framework.Graphics.DeviceResourceManager.RecreateResources(), Microsoft.Xna.Framework.Graphics.DeviceResourceManager.ReleaseAllDeviceResources(), and Microsoft.Xna.Framework.Graphics.DeviceResourceManager.ReleaseAutomaticResources().