IsPrime Method
Definition
- Namespace
- Cuemon.Extensions
- Assemblies
- Cuemon.Extensions.Core.dll
IsPrime(int)
Determines whether the specified value is a prime number.
public static bool IsPrime(this 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.