Click or drag to resize
ArrayGetValue Method (Int32, Int32)
Gets the value at the specified position in the two-dimensional Array. The indexes are specified as 32-bit integers.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public Object GetValue(
	int index1,
	int index2
)

Parameters

index1
Type: SystemInt32
A 32-bit integer that represents the first-dimension index of the Array element to get.
index2
Type: SystemInt32
A 32-bit integer that represents the second-dimension index of the Array element to get.

Return Value

Type: Object
The value at the specified position in the two-dimensional Array.
Exceptions
ExceptionCondition
ArgumentExceptionThe current Array does not have exactly two dimensions.
IndexOutOfRangeExceptionEither index1 or index2 is outside the range of valid indexes for the corresponding dimension of the current Array.
See Also