Gets the value at the specified position in the two-dimensional Array.
[Visual Basic] Overloads Public Function GetValue( _ ByVal index1 As Integer, _ ByVal index2 As Integer _ ) As Object [C#] public object GetValue( int index1, int index2 ); [C++] public: Object* GetValue( int index1, int index2 ); [JScript] public function GetValue( index1 : int, index2 : int ) : Object;
The value at the specified position in the Array.
Exception Type | Condition |
---|---|
ArgumentException | The Array does not have exactly two dimensions. |
IndexOutOfRangeException | index1 or index2 is outside the range of valid indices for the corresponding dimension of the Array. |
The GetLowerBound and GetUpperBound methods can be used to determine whether any of the indices is out of bounds.
Array Class | Array Members | System Namespace | Array.GetValue Overload List | GetLowerBound | GetUpperBound | SetValue