Click or drag to resize
ArraySetValue Method (Object, Int64)
Sets a value to the element at the specified position in the multidimensional Array. The indexes are specified as an array of 64-bit integers.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public void SetValue(
	Object value,
	params long[] indices
)

Parameters

value
Type: SystemObject
The new value for the specified element.
indices
Type: SystemInt64
A one-dimensional array of 64-bit integers that represent the indexes specifying the position of the element to set.
Exceptions
ExceptionCondition
ArgumentNullExceptionindices is null.
ArgumentExceptionThe number of dimensions in the current Array is not equal to the number of elements in indices.
InvalidCastExceptionvalue cannot be cast to the element type of the current Array.
ArgumentOutOfRangeExceptionAny element in indices is outside the range of valid indexes for the corresponding dimension of the current Array.
See Also