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


In This Topic
    ToInt Method
    In This Topic
    Convert value to System.Int32.
    Syntax
    'Declaration
     
    Public Shared Function ToInt( _
       ByVal value As Object _
    ) As Integer
    'Usage
     
    Dim value As Object
    Dim value As Integer
     
    value = CalcConvert.ToInt(value)
    public static int ToInt( 
       object value
    )

    Parameters

    value
    The value to be converted.

    Return Value

    A System.Int32 indicate the convert result.
    Exceptions
    ExceptionDescription
    Can not convert value to System.Int32
    Remarks
    If value is a null reference (Nothing in Visual Basic), return 0. If value is double, or float, or decimal, orlong, or short, or sbyte, or ulong, oruint, or ushort, or byte, explicitly convert it to System.Int32. If value is bool, return 1 if the value is true, otherwise return 0. If value is System.DateTime, return OADate of value. If value is System.TimeSpan, return TotalDays of value.
    See Also