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

◆ Fill< T >() [2/2]

static void System.Array.Fill< T > ( T[] array,
T value,
int startIndex,
int count )
inlinestatic

Definition at line 1603 of file Array.cs.

1604 {
1605 if (array == null)
1606 {
1607 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
1608 }
1609 if ((uint)startIndex > (uint)array.Length)
1610 {
1611 ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index();
1612 }
1613 if ((uint)count > (uint)(array.Length - startIndex))
1614 {
1615 ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count();
1616 }
1617 if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
1618 {
1619 for (int i = startIndex; i < startIndex + count; i++)
1620 {
1621 array[i] = value;
1622 }
1623 }
1624 else
1625 {
1627 }
1628 }
static unsafe ref byte GetArrayDataReference(Array array)

References System.array, System.count, System.Runtime.InteropServices.MemoryMarshal.GetArrayDataReference(), System.startIndex, System.ThrowHelper.ThrowArgumentNullException(), System.ThrowHelper.ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count(), System.ThrowHelper.ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index(), and System.value.