Returns a value indicating whether an integer is even.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static bool IsEven(
this int n
)
<ExtensionAttribute>
Public Shared Function IsEven (
n As Integer
) As Boolean
public:
[ExtensionAttribute]
static bool IsEven(
int n
)
[<ExtensionAttribute>]
static member IsEven :
n : int -> bool
Parameters
- n
- Type: SystemInt32
A 32-bit integer.
Return Value
Type:
Booleantrue if the number is even;
otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Int32. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Reference