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

◆ GetValue() [8/8]

object? System.Array.GetValue ( params long[] indices)
inline

Definition at line 1109 of file Array.cs.

1110 {
1111 if (indices == null)
1112 {
1113 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices);
1114 }
1115 if (Rank != indices.Length)
1116 {
1117 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices);
1118 }
1119 int[] array = new int[indices.Length];
1120 for (int i = 0; i < indices.Length; i++)
1121 {
1122 long num = indices[i];
1123 int num2 = (int)num;
1124 if (num != num2)
1125 {
1126 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_HugeArrayNotSupported);
1127 }
1128 array[i] = num2;
1129 }
1130 return GetValue(array);
1131 }
object? GetValue(params int[] indices)
Definition Array.cs:980

References System.array, System.Array.GetValue(), System.indices, System.Array.Rank, System.ThrowHelper.ThrowArgumentException(), System.ThrowHelper.ThrowArgumentNullException(), and System.ThrowHelper.ThrowArgumentOutOfRangeException().