Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ TryCopyTo< T >()

static bool System.Collections.Immutable.ImmutableExtensions.TryCopyTo< T > ( this IEnumerable< T > sequence,
T[] array,
int arrayIndex )
inlinestaticpackage

Definition at line 158 of file ImmutableExtensions.cs.

159 {
160 if (sequence is IList<T>)
161 {
163 {
165 return true;
166 }
167 if (sequence.GetType() == typeof(T[]))
168 {
169 T[] array2 = (T[])sequence;
170 Array.Copy(array2, 0, array, arrayIndex, array2.Length);
171 return true;
172 }
174 {
175 Array.Copy(immutableArray.array, 0, array, arrayIndex, immutableArray.Length);
176 return true;
177 }
178 }
179 return false;
180 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)

References System.array, System.arrayIndex, System.Array.Copy(), and System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo().