Share via


SqlDataRecord.GetInt32(Int32) Method

Definition

Gets the value for the column specified by the ordinal as a Int32.

public:
 virtual int GetInt32(int ordinal);
public virtual int GetInt32 (int ordinal);
abstract member GetInt32 : int -> int
override this.GetInt32 : int -> int
Public Overridable Function GetInt32 (ordinal As Integer) As Integer

Parameters

ordinal
Int32

The zero-based ordinal of the column.

Returns

The column value as a Int32.

Implements

Exceptions

The ordinal is less than 0 or greater than the number of columns (that is, FieldCount).

The column specified by ordinal is null.

There is a type mismatch.

Applies to