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
ProductVersionsPlatforms
.NET6, 7Windows, Linux, MacOS
.NET Framework4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdDecimal Structure
TdDecimal Members