Spread Silverlight Documentation
ToDouble Method


GrapeCity.CalcEngine Namespace > CalcConvert Class : ToDouble Method
The value to be converted.
Convert value to double.
Syntax
'Declaration
 
Public Shared Function ToDouble( _
   ByVal value As System.Object _
) As System.Double
'Usage
 
Dim value As System.Object
Dim value As System.Double
 
value = CalcConvert.ToDouble(value)
public static System.double ToDouble( 
   System.object value
)

Parameters

value
The value to be converted.

Return Value

A double indicate the convert result.
Exceptions
ExceptionDescription
Can not convert value to double
Remarks
If value is a null reference (Nothing in Visual Basic), return 0d. If value is System.Int32, or float, or decimal, orlong, or short, or sbyte, or ulong, oruint, or ushort, or byte, explicitly convert it to double. If value is bool, return 1d if the value is true, otherwise return 0d. If value is System.DateTime, return OADate of value. If value is System.TimeSpan, return TotalDays of value. If value is System.String, first try parse it to double with current culture and any number style. if failed, then try parse with English culture (en) and any number style.
See Also

Reference

CalcConvert Class
CalcConvert Members