Friday, 15 June 2012

How to generate a random unique 5 digit number + C#

Below is the method used to generate random 5 digit number.

public int getRandomID ()

{

Random r = new Random()

return r.Next(10000,99999);

}

The number 10000, 99999 specifies the range.

No comments:

Post a Comment