|
DataRowExtensionsAsSingle(DataRow, String, Single) Method
|
Attempts to type cast the specified column of a to the defined type.
Namespace: GSF.DataAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.261-beta+9650ae903f9e9379329c3458df90b6d86f193861
Syntaxpublic static float AsSingle(
this DataRow row,
string columnName,
float valueIfNull
)
<ExtensionAttribute>
Public Shared Function AsSingle (
row As DataRow,
columnName As String,
valueIfNull As Single
) As Single
public:
[ExtensionAttribute]
static float AsSingle(
DataRow^ row,
String^ columnName,
float valueIfNull
)
[<ExtensionAttribute>]
static member AsSingle :
row : DataRow *
columnName : string *
valueIfNull : float32 -> float32 GSF.Data.DataRowExtensions.AsSingle = function(row, columnName, valueIfNull);
View SourceParameters
- row DataRow
- the row
- columnName String
- the column name
- valueIfNull Single
- the value to replace if null
Return Value
Single if DBNull, the value otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataRow. 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).
See Also