Send feedback on this topic.
Teradata.Client.Provider
IsPositive Property (TdNumber)
Example 



Teradata.Client.Provider Namespace > TdNumber Structure : IsPositive Property
Indicates whether this TdNumber instance is greater than or equal to zero.
Syntax
'Declaration
 
Public ReadOnly Property IsPositive As Boolean
'Usage
 
Dim instance As TdNumber
Dim value As Boolean
 
value = instance.IsPositive
public bool IsPositive {get;}
public:
property bool IsPositive {
   bool get();
}

Property Value

true if this instance is greater than or equal to zero; false otherwise.
Remarks
IsPositive returns false if this instance is Null.
Example
This example show how to check for positive and negative numbers.
TdNumber x = new TdNumber(-1);
            
if (x.IsPositive == true)
{   
    Console.WriteLine("x is a positive number.");
}
else
{
    if (x.IsNull == false)
    {
        Console.WriteLine("x is a negative number.");
    }
    else
    {
        Console.WriteLine("x is Null");
    }
}
Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdNumber Structure
TdNumber Members