random range int c# code example
Example 1: random number generator unity
int num = Random.Range(min, max);
Example 2: unity random int
public int RanTimerHigh = 10;
public int RanTimerLow = 1;
void Start()
{
int RandomInt = Random.Range(RanTimerLow, RanTimerHigh);
}
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: generate range c#
IEnumerable<int> squares = Enumerable.Range(1, 10).Select(x => x * x);
foreach (int num in squares)
{
Console.WriteLine(num);
}