SqlDataReader.Item[Int32] Property

Definition

Gets the value of a column in its native format.

Overloads

Item[String]

Gets the value of the specified column in its native format given the column name.

Item[Int32]

Gets the value of the specified column in its native format given the column ordinal.

Item[String]

Gets the value of the specified column in its native format given the column name.

public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public object this[string name] { get; }
member this.Item(string) : obj
Default Public ReadOnly Property Item(name As String) As Object

Parameters

name
String

The column name.

Property Value

The value of the specified column in its native format.

Implements

Exceptions

No column with the specified name was found.

Remarks

A case-sensitive lookup is performed first. If it fails, a second case-insensitive search is made (a case-insensitive comparison is done using the database collation). Unexpected results can occur when comparisons are affected by culture-specific casing rules. For example, in Turkish, the following example yields the wrong results because the file system in Turkish does not use linguistic casing rules for the letter 'i' in "file".

This method is kana-width insensitive.

See also

Item[Int32]

Gets the value of the specified column in its native format given the column ordinal.

public:
 property System::Object ^ default[int] { System::Object ^ get(int i); };
public object this[int i] { get; }
member this.Item(int) : obj
Default Public ReadOnly Property Item(i As Integer) As Object

Parameters

i
Int32

The zero-based column ordinal.

Property Value

The value of the specified column in its native format.

Implements

Exceptions

The index passed was outside the range of 0 through FieldCount.

See also

Applies to