Share via


BigInteger.IsEven Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Indicates whether the value of the current BigInteger object is an even number.

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

Syntax

'Declaration
Public ReadOnly Property IsEven As Boolean
public bool IsEven { get; }

Property Value

Type: System.Boolean
true if the value of the BigInteger object is an even number; otherwise, false.

Remarks

This property is a convenience feature that indicates whether a BigInteger value is evenly divisible by two. It is equivalent to the following expression:

[C#]

value % 2 == 0;

[Visual Basic]

value Mod 2 = 0

If the value of the current BigInteger object is BigInteger.Zero, the property returns true.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.