NullableTypes Class Library

DBNullConvert.ToNullableDouble Method 

Converts an object value that is DBNull or System.Double to an equivalent NullableDouble value.

[Visual Basic]
Public Shared Function ToNullableDouble( _
   ByVal x As Object _
) As NullableDouble
public static NullableDouble ToNullableDouble(
   object x


A value of Double type from either a DataRow Item value, a Parameters Item value or a IDataRecord GetValue returned value.

Return Value

Null if x is DBNull otherwise a NullableDouble constructed from x.


Exception TypeCondition
ArgumentNullExceptionx is null.
InvalidCastExceptionx is neither DBNull or of type Double.

See Also

DBNullConvert Class | NullableTypes.HelperFunctions Namespace