ArraySetValue Method (Object, Int64) |
Sets a value to the element at the specified position in the one-dimensional
Array. The index is specified as a 64-bit integer.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public void SetValue(
Object value,
long index
)
Parameters
- value
- Type: SystemObject
The new value for the specified element. - index
- Type: SystemInt64
A 64-bit integer that represents the position of the Array element to set.
Exceptions Exception | Condition |
---|
ArgumentException | The current Array does not have exactly one dimension. |
InvalidCastException | value cannot be cast to the element type of the current Array. |
ArgumentOutOfRangeException | index is outside the range of valid indexes for the current Array. |
See Also