Share via


SqlCeDataReader.GetByte Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets the value of the specified column as a byte.

Public Overridable Function GetByte( _
   ByVal ordinal As Integer _) As Byte Implements IDataRecord.GetByte
[C#]
public virtual byte GetByte(intordinal);
[C++]
public: virtual unsigned char GetByte(intordinal);
[JScript]
public function GetByte(
   ordinal : int) : Byte;

Parameters

  • ordinal
    The zero-based column ordinal.

Return Value

The value of the specified column as a byte.

Implements

IDataRecord.GetByte

Exceptions

Exception Type Condition
InvalidCastException The specified cast is not valid.
SqlNullValueException The value is null.
InvalidOperationException The operation is not valid. The SqlCeDataReader may be positioned after the last row in the result set.

Remarks

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

Call IsDBNull to check for null values before calling this method.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeDataReader Class | SqlCeDataReader Members | System.Data.SqlServerCe Namespace