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

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

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

Definition at line 1584 of file Array.cs.

1585 {
1586 if (array == null)
1587 {
1588 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
1589 }
1590 if (!typeof(T).IsValueType && array.GetType() != typeof(T[]))
1591 {
1592 for (int i = 0; i < array.Length; i++)
1593 {
1594 array[i] = value;
1595 }
1596 }
1597 else
1598 {
1599 new Span<T>(array).Fill(value);
1600 }
1601 }

References System.array, System.ThrowHelper.ThrowArgumentNullException(), and System.value.