c# random between two numbers code example
Example 1: get random number c#
Random rnd = new Random();
int month = rnd.Next(1, 13);
int dice = rnd.Next(1, 7);
int card = rnd.Next(52);
Example 2: how to generate random numbers in c#
int randomNumber = UnityEngine.Random.Range(1, 100);
Example 3: c# generate random int in range
Random r = new Random();
int rInt = r.Next(0, 100);
int range = 100;
double rDouble = r.NextDouble()* range;
Example 4: c# two different random numbers
Random random = new Random();
int randomNumber1 = random.Next(0, 300);
int randomNumber2 = random.Next(0, 300);