System.Array.GetValue Method

Gets the value at the specified position in the two-dimensional Array. The indexes are specified as 64-bit integers.

Syntax

[System.Runtime.InteropServices.ComVisible(false)]
public object GetValue (long index1, long index2)

Parameters

index1
A 64-bit integer that represents the first-dimension index of the Array element to get.
index2
A 64-bit integer that represents the second-dimension index of the Array element to get.

Returns

The value at the specified position in the two-dimensional Array.

Remarks

The Array.GetLowerBound(int) and Array.GetUpperBound(int) methods can determine whether any of the indexes is out of bounds.

This method is an O(1) operation.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0