Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function GetValue ( _
index As Integer _
) As Object
public Object GetValue(
int index
)
public:
Object^ GetValue(
int index
)
member GetValue :
index:int -> Object
public function GetValue(
index : int
) : Object
Parameters
- index
Type: System. . :: . .Int32
A 32-bit integer that represents the position of the Array element to get.
Return Value
Type: System. . :: . .Object
The value at the specified position in the one-dimensional Array.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The current Array does not have exactly one dimension. |
IndexOutOfRangeException | index is outside the range of valid indexes for the current Array. |
Remarks
The GetLowerBound and GetUpperBound methods can determine whether the value of index is out of bounds.
This method is an O(1) operation.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.