Is it possible to generate a random-number in C# ?
Can anyone tell me how can I generate a random number in C#?
if it is possible
Answered by WWEMONSTERMONST [earned 5 cycles]
It's just easy you can just use the following code:
Random rnd = new Random(); int num1 = rnd.Next(1, 13); // creates a number between 1 and 12 int num2 = rnd.Next(1, 7); // creates a number between 1 and 6 int num3 = rnd.Next(52); // creates a number between 0 and 51