IntegerMath.IsPrime Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

IsPrime(Int16) Returns a value indicating whether an integer is a prime number.
IsPrime(Int32) Returns a value indicating whether an integer is a prime number.

IsPrime(Int16)

Returns a value indicating whether an integer is a prime number.
C#
public static bool IsPrime(
	short n
)

Parameters

n  Int16
A short 16-bit integer.

Return Value

Boolean
true if n is a prime number; otherwise false.

IsPrime(Int32)

Returns a value indicating whether an integer is a prime number.
C#
public static bool IsPrime(
	int n
)

Parameters

n  Int32
A 32-bit integer.

Return Value

Boolean
true if n is a prime number; otherwise false.

See Also