BigInteger.Sign Property

 

Gets a number that indicates the sign (negative, positive, or zero) of the current BigInteger object.

Namespace:   System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public int Sign { get; }

Property Value

Type: System.Int32

A number that indicates the sign of the BigInteger object, as shown in the following table.

Number

Description

-1

The value of this object is negative.

0

The value of this object is 0 (zero).

1

The value of this object is positive.

The Sign property is equivalent to the Math.Sign method for the primitive numeric types.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1
Return to top
Show: