System.Array.GetValue Method

Gets the value at the specified position in the one-dimensional Array. The index is specified as a 64-bit integer.

Syntax

[System.Runtime.InteropServices.ComVisible(false)]
public object GetValue (long index)

Parameters

index
A 64-bit integer that represents the position of the Array element to get.

Returns

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

Remarks

The Array.GetLowerBound(int) and Array.GetUpperBound(int) methods can determine whether the value of index 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