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

◆ SetValue() [8/8]

void System.Array.SetValue ( object? value,
params long[] indices )
inline

Definition at line 1178 of file Array.cs.

1179 {
1180 if (indices == null)
1181 {
1182 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.indices);
1183 }
1184 if (Rank != indices.Length)
1185 {
1186 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_RankIndices);
1187 }
1188 int[] array = new int[indices.Length];
1189 for (int i = 0; i < indices.Length; i++)
1190 {
1191 long num = indices[i];
1192 int num2 = (int)num;
1193 if (num != num2)
1194 {
1195 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index, ExceptionResource.ArgumentOutOfRange_HugeArrayNotSupported);
1196 }
1197 array[i] = num2;
1198 }
1200 }
unsafe void SetValue(object? value, int index)
Definition Array.cs:1022

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