Row.GetAs Method

Definition

Overloads

GetAs<T>(Int32)

Returns the column value at the given index, as a type T. TODO: If the original type is "long" and its value can be fit into the "int", Pickler will serialize the value as int. Since the value is boxed, GetAs<T>(Int32) will throw an exception.

GetAs<T>(String)

Returns the column value whose column name is given, as a type T. TODO: If the original type is "long" and its value can be fit into the "int", Pickler will serialize the value as int. Since the value is boxed, GetAs<T>(String) will throw an exception.

GetAs<T>(Int32)

Returns the column value at the given index, as a type T. TODO: If the original type is "long" and its value can be fit into the "int", Pickler will serialize the value as int. Since the value is boxed, GetAs<T>(Int32) will throw an exception.

public T GetAs<T> (int index);
member this.GetAs : int -> 'T
Public Function GetAs(Of T) (index As Integer) As T

Type Parameters

T

Type to convert to

Parameters

index
Int32

Index to look up

Returns

T

A column value as a type T

Applies to

GetAs<T>(String)

Returns the column value whose column name is given, as a type T. TODO: If the original type is "long" and its value can be fit into the "int", Pickler will serialize the value as int. Since the value is boxed, GetAs<T>(String) will throw an exception.

public T GetAs<T> (string columnName);
member this.GetAs : string -> 'T
Public Function GetAs(Of T) (columnName As String) As T

Type Parameters

T

Type to convert to

Parameters

columnName
String

Column name to look up

Returns

T

A column value as a type T

Applies to