GrapeCity.Xaml.CalcEngine
ToBool Method


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

Parameters

value
The value to be converted.

Return Value

A bool indicate the convert result.
Exceptions
ExceptionDescription
Can not convert value to bool
Remarks
If value is a null reference (Nothing in Visual Basic), return false. If value is double, return true only if value is not equals to 0d. If value is float, return true only if value is not equals to 0f. If value is decimal, return true only if value is not equals to 0m. If value is long, return true only if value is not equals to 0. If value is System.Int32, return true only if value is not equals to 0. If value is short, return true only if value is not equals to 0. If value is sbyte, return true only if value is not equals to 0. If value is ulong, return true only if value is not equals to 0. If value is uint, return true only if value is not equals to 0. If value is ushort, return true only if value is not equals to 0. If value is byte, return true only if value is not equals to 0. If value is DateTime, return true only if the OADate of value is not equals to 0. If value is TimeSpan, return true only if the TotalDays of value is not equals to 0.
See Also

Reference

CalcConvert Class
CalcConvert Members