NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Array.SetValue (Object, Int32)

Assigns a value to the element at the specified position in the one-dimensional Array.

[Visual Basic]
Overloads Public Sub SetValue( _
   ByVal value As Object, _
   ByVal index As Integer _
)
[C#]
public void SetValue(
   object value,
   int index
);
[C++]
public: void SetValue(
   Object* value,
   int index
);
[JScript]
public function SetValue(
   value : Object,
   index : int
);

Parameters

value
The new value for the specified element.
index
The position of the Array element to set.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentException The Array does not have exactly one dimension.

-or-

value does not contain a type that can be widened, using the standard widening conversions, to the element type of the Array.

IndexOutOfRangeException index is outside the range of valid indices for the Array.

Remarks

The GetLowerBound and GetUpperBound methods can be used to determine whether the value of index is out of bounds.

See Also

Array Class | Array Members | System Namespace | Array.SetValue Overload List | GetLowerBound | GetUpperBound | GetValue