The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
DataTableReader::Item Property (Int32)
.NET Framework (current version)
Gets the value of the specified column in its native format given the column ordinal.
Assembly: System.Data (in System.Data.dll)
public: property Object^ default[ int ordinal ] { virtual Object^ get(int ordinal) override; }
Parameters
- ordinal
-
Type:
System::Int32
The zero-based column ordinal.
Implements
IDataRecord::Item[Int32]| Exception | Condition |
|---|---|
| IndexOutOfRangeException | The index passed was outside the range of 0 to FieldCount - 1. |
The following example displays the contents of all the columns, in all the rows from the supplied DataTableReader. The code uses the Item method (the indexer, in Microsoft C#) to retrieve the value that is contained in each column.
.NET Framework
Available since 2.0
Available since 2.0
Show: