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, Int32)

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

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

Parameters

value
The new value for the specified element.
index1
The first-dimension index of the Array element to set.
index2
The second-dimension index of the Array element to set.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentException The Array does not have exactly two dimensions.

-or-

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

IndexOutOfRangeException index1 or index2 is outside the range of valid indices for the corresponding dimension of the Array.

Remarks

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

See Also

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