DataReader.GetItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 in 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.
Implements
Exceptions
The index
parameter is not valid.
Applies to
GetItem(String)
Retrieves the value of a data item with the specified name in the current block of data.
public:
virtual System::Object ^ GetItem(System::String ^ name);
public virtual object GetItem (string name);
abstract member GetItem : string -> obj
override this.GetItem : string -> obj
Public Overridable Function GetItem (name As String) As Object
Parameters
- name
- String
The name of the data item in the current block to retrieve.
Returns
The string value of the item with the specified name.