BigInteger.Sign Property

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

Namespace:  System.Numerics
Assemblies:   System.Runtime.Numerics (in System.Runtime.Numerics.dll)
  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.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft