generate 5 digit random number in c#

sam
sam
134 Points
62 Posts

Hi,

how to generate 5 digit random number in c#?

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

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1170 Points
210 Posts
Marked as answer      

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
banner

Blog

Active User (2)

 Log In to Chat