DbDataReaderExtensionsFieldValueOrDefaultT Method |
Gets the field value or
default(), if the value is
DBNull.
Namespace: Dundas.BI.DataAssembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntaxpublic 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 DbDataReader
- The data reader.
- name String
- The name of the column.
Type Parameters
- T
- The type of the value to be returned.
Return Value
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