I am currently using the following code but its very slow for large numbers
static int divisor(int number)
{
int i;
One of the industry standard methods for finding factors of large numbers is the Quadratic Sieve algorithm.
Have a read of this:
http://en.wikipedia.org/wiki/Quadratic_sieve
P.S. you should also consider how big your numbers are. Different factorisation algorithms tend to perform well for a certain size, and not for others. As noted in the QS wiki article, this method is generally the fastest for numbers less than about 100 decimal digits.