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::GetName Method (Int32)
.NET Framework (current version)
Gets the value of the specified column as a String.
Assembly: System.Data (in System.Data.dll)
Parameters
- ordinal
-
Type:
System::Int32
The zero-based column ordinal
Implements
IDataRecord::GetName(Int32)| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The index passed was outside the range of 0 to FieldCount - 1. |
| InvalidOperationException | An attempt was made to read or access a column in a closed DataTableReader. |
The GetName and GetOrdinal methods provide inverse functionality. That is, calling GetOrdinal on the return value of calling GetName should return the original parameter passed to GetName; the same applies to calling the procedures in the opposite order.
.NET Framework
Available since 2.0
Available since 2.0
Show: