Spread WPF 17
GrapeCity.CalcEngine Namespace / CalcConvert Class / ToLong Method
The value to be converted.


In This Topic
    ToLong Method
    In This Topic
    Convert value to long.
    Syntax
    'Declaration
     
    Public Shared Function ToLong( _
       ByVal value As Object _
    ) As Long
    'Usage
     
    Dim value As Object
    Dim value As Long
     
    value = CalcConvert.ToLong(value)
    public static long ToLong( 
       object value
    )

    Parameters

    value
    The value to be converted.

    Return Value

    A long indicate the convert result.
    Exceptions
    ExceptionDescription
    Can not convert value to long
    Remarks
    If value is a null reference (Nothing in Visual Basic), return 0L. 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 long. If value is bool, return 1L if the value is true, otherwise return 0L. If value is System.DateTime, return OADate of value. If value is System.TimeSpan, return TotalDays of value.
    See Also