Share via


DataReader.GetItem Method

Definition

Overloads

GetItem(Int32)

Retrieves the value of the item at the specified index in the current block of data.

GetItem(String)

Retrieves the value of a data item with the specified name in the current block of data.

GetItem(Int32)

Retrieves the value of the item at the specified index in the current block of data.

public:
 abstract System::Object ^ GetItem(int index);
public abstract object GetItem (int index);
abstract member GetItem : int -> obj
Public MustOverride Function GetItem (index As Integer) As Object

Parameters

index
Int32

Index into the current block of the data item at which to retrieve the integer value.

Returns

Returns an integer value from the specified index in the current block of data.

Exceptions

The index parameter is invalid.

Applies to

GetItem(String)

Retrieves the value of a data item with the specified name in the current block of data.

public:
 abstract System::Object ^ GetItem(System::String ^ name);
public abstract object GetItem (string name);
abstract member GetItem : string -> obj
Public MustOverride Function GetItem (name As String) As Object

Parameters

name
String

The name of the data item in the current block to retrieve.

Returns

Returns the string value of the item with the specified name.

Exceptions

The name parameter is invalid.

Applies to