DbDataReaderExtensionsFieldValueOrDefaultT Method |
Gets the field value or
default(), if the value is
DBNull.
Namespace:
Dundas.BI.Data
Assembly:
Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.4.0.1000)
Syntax public static T FieldValueOrDefault<T>(
this DbDataReader target,
string name
)
<ExtensionAttribute>
Public Shared Function FieldValueOrDefault(Of T) (
target As DbDataReader,
name As String
) As T
public:
[ExtensionAttribute]
generic<typename T>
static T FieldValueOrDefault(
DbDataReader^ target,
String^ name
)
[<ExtensionAttribute>]
static member FieldValueOrDefault :
target : DbDataReader *
name : string -> 'T
Parameters
- target
- Type: System.Data.CommonDbDataReader
The data reader. - name
- Type: SystemString
The name of the column.
Type Parameters
- T
- The type of the value to be returned.
Return Value
Type:
TThe field value or
default(), if the value is
DBNull.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DbDataReader. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions See Also