SpreadsheetGear 2023
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.
Function ValidateNumber( _
   ByRef number As System.Double _
) As System.Boolean
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


The number to validate.

Return Value

true if the number is valid, false otherwise.
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.

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


IValues Interface
IValues Members
SetNumber Method
IsValidNumber Method