| Author: Manoop 10 Jul 2008 | Member Level: Silver | Rating: Points: 4 |
use this function
private static bool IsPrime(long checkValue) { bool isPrime = true;
foreach (int prime in _primes) { if ((checkValue % prime) == 0 && prime <= Math.Sqrt(checkValue)) { isPrime = false; break; } }
return isPrime; }
|