Integer Math.Is Prime Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
IsPrime( | Returns whether an integer is a prime number. |
IsPrime( | Returns whether an integer is a prime number. |
IsPrime(Int16)
Returns whether an integer is
a prime number.
public static bool IsPrime(
short n
)
Parameters
- n Int16
- A short 16-bit integer.
Return Value
Booleantrue if n is a prime number; otherwise false.
IsPrime(Int32)
Returns whether an integer is
a prime number.
public static bool IsPrime(
int n
)
Parameters
- n Int32
- A 32-bit integer.
Return Value
Booleantrue if n is a prime number; otherwise false.