generate 5 digit random number in c#

sam
sam
378 Points
48 Posts

Hi,

how to generate 5 digit random number in c#?

Views: 11786
Total Answered: 1
Total Marked As Answer: 1
Posted On: 03-Jul-2015 05:04

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
4916 Points
27 Posts
         

Hi sam,

Use Random class as: 

 
string Randomstring = ""; 
Random random = new Random();
Randomstring= random.Next(10000, 99999).ToString("00000");
 
Posted On: 03-Jul-2015 09:41
 Log In to Chat