c# random.range code example
Example 1: random number generator unity
int num = Random.Range(min, max);
Example 2: unity random float
float number = Random.Range(0.0f, 3.0f);
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: unity random range
Random.Range(-10.0f, 10.0f);
Example 5: generate range c#
IEnumerable<int> squares = Enumerable.Range(1, 10).Select(x => x * x);
foreach (int num in squares)
{
Console.WriteLine(num);
}