IntegerMath.IsPrime Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

Overload List

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

IsPrime(Int16)

Returns 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 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