Forums - C# Corner

Forum guidelines
Mahesh Chand

Mahesh Chand

  • Admin
  • 361.9k
  • 135.1m

How To Generate a random number in C#

Sep 9 2018 1:14 PM
The following code in Listing 1 returns a random number. 
  1. // Generate a random number  
  2. Random random = new Random();  
  3. // Any random integer  
  4. int num = random.Next();  

Answers (1)