Helper.ToDoubleExceptNull Method
Converts a specified the value into an equivalent Double value.
Namespace: Microsoft.SharePoint.WorkflowActions
Assembly: Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)
Syntax
'Declaration
Public Shared Function ToDoubleExceptNull ( _
context As WorkflowContext, _
val As Object _
) As Double
'Usage
Dim context As WorkflowContext
Dim val As Object
Dim returnValue As Double
returnValue = Helper.ToDoubleExceptNull(context, _
val)
public static double ToDoubleExceptNull(
WorkflowContext context,
Object val
)
Parameters
context
Type: Microsoft.SharePoint.WorkflowActions.WorkflowContextA workflow context that contains properties that are associated with the active workflow instance.
val
Type: System.ObjectA value to be converted.
Return Value
Type: System.Double
A value that is converted by the val.
Remarks
If the val is a Boolean object, then this method returns 1.0 for true and 0.0 for false; if the val is a SPItemKey object, then this method converts the value of the Id into an equivalent Double value.
This method throws a CoercionException if val is null or cannot be converted into a Double object.