Spread WPF Documentation
ToLong Method


The value to be converted.
Convert value to long.
Syntax
'Declaration
 
Public Shared Function ToLong( _
   ByVal value As System.Object _
) As System.Long
'Usage
 
Dim value As System.Object
Dim value As System.Long
 
value = CalcConvert.ToLong(value)
public static System.long ToLong( 
   System.object value
)

Parameters

value
The value to be converted.

Return Value

A long indicate the convert result.
Exceptions
ExceptionDescription
System.InvalidCastExceptionCan 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.
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

CalcConvert Class
CalcConvert Members

 

 


Copyright © GrapeCity, inc. All rights reserved.