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



Teradata.Client.Provider Namespace > TdDecimal Structure : IsPositive Property
Indicates whether this TdDecimal instance is greater than or equal to zero.
Syntax
'Declaration
 
Public ReadOnly Property IsPositive As Boolean
'Usage
 
Dim instance As TdDecimal
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 shows how to check for positive and negative numbers.
TdDecimal x = new TdDecimal(-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 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdDecimal Structure
TdDecimal Members