Click or drag to resize

EAPUtilToDoubleSafe Method

Convert an object to a double value handling the case when the object is null or DBNull. When the object is null or cannot be converted successfully, the return value is the value of the defaultValue parameter. This method will never throw an exception. Use ToDouble(Object, Double) if an exception is desired for invalid (non-null) values.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public static double ToDoubleSafe(
	Object value,
	double defaultValue = 0
)

Parameters

value
Type: SystemObject
The object to convert.
defaultValue (Optional)
Type: SystemDouble
The value to return if the object is DBNull.

Return Value

Type: Double
The converted object as a double.
See Also