IsPrime Method
Definition
IsPrime(int)
Determines whether the specified value is a prime number.
public static bool IsPrime(int value)
Parameters
valueintThe positive integer to determine whether is a prime number.
Returns
- bool
trueif the specifiedvalueis a prime number; otherwise,false.
Exceptions
- ArgumentException
valuehas a value smaller than 0.