System.Data.SqlClient.SqlDataReader.GetByte Method

Gets the value of the specified column as a byte.

Syntax

public override byte GetByte (int i)

Parameters

i
The zero-based column ordinal.

Returns

The value of the specified column as a byte.

Remarks

No conversions are performed; therefore, the data retrieved must already be a byte.

Call SqlDataReader.IsDBNull(int) to check for null values before calling this method.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0