Edit

Share via


DbExtensions.GetValue<TValue>(IDataRecord, String) Method

Definition

Returns a value with the given .

public static TValue GetValue<TValue> (this System.Data.IDataRecord record, string fieldName);
static member GetValue : System.Data.IDataRecord * string -> 'Value
<Extension()>
Public Function GetValue(Of TValue) (record As IDataRecord, fieldName As String) As TValue

Type Parameters

TValue

The type of value to retrieve.

Parameters

record
IDataRecord

The record from which to retrieve the value.

fieldName
String

The name of the field.

Returns

TValue

Value in the given field indicated by .

Exceptions

Remarks

This function throws if the given does not exist.

Applies to