SpreadsheetGear 2017
ValidateNumber Method (IValues)






SpreadsheetGear.Advanced.Cells Namespace > IValues Interface : ValidateNumber Method
The number to validate.
Returns true if the specified number is a valid number; converts numbers suffering from underflow to +0.0; returns false if the number cannot be validated.
Syntax
'Declaration
 
Function ValidateNumber( _
   ByRef number As System.Double _
) As System.Boolean
'Usage
 
Dim instance As IValues
Dim number As System.Double
Dim value As System.Boolean
 
value = instance.ValidateNumber(number)
System.bool ValidateNumber( 
   ref System.double number
)
function ValidateNumber( 
   var  number: System.Double
): System.Boolean; 
function ValidateNumber( 
   number : System.double
) : System.boolean;
System.bool ValidateNumber( 
   ref System.double number
) 
System.bool ValidateNumber( 
   System.double% number
) 

Parameters

number
The number to validate.

Return Value

true if the number is valid, false otherwise.
Remarks
Unlike Value, SetNumber assumes the number being placed in a cell is a valid number. A valid number is either +0.0, or a non-zero number which is not suffering from underflow or overflow. If number is suffering from underflow or is equal to -0.0, it will be set to +0.0 and true will be returned. If the number cannot be validated, false is returned.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IValues Interface
IValues Members
SetNumber Method
IsValidNumber Method