Hi,
Here is the way to generate 5 digit random unique number.
Random objRandom = new Random();
int intValue = objRandom.Next(10000, 99999);
The number 10000, 99999 specifies the range
For example - If you want generate 6 digit random number, just increase the range to 100000, 999999.
Hope this helps.
--
Happy Coding
Gopinath
Here is the way to generate 5 digit random unique number.
Random objRandom = new Random();
int intValue = objRandom.Next(10000, 99999);
The number 10000, 99999 specifies the range
For example - If you want generate 6 digit random number, just increase the range to 100000, 999999.
Hope this helps.
--
Happy Coding
Gopinath
No comments:
Post a Comment