0
How to choose a random number in c# ?
I need to know how to atribute a random value to an integer. Can you help me ?
5 Respuestas
+ 4
using System;
class Program
{
static void Main()
{
// ... Create new Random object.
Random r = new Random();
// ... Get three random numbers.
// Always 5, 6, 7, 8 or 9.
Console.WriteLine(r. Next( 5, 10));
Console.WriteLine(r.Next(5, 10));
Console.WriteLine(r.Next(5, 10));
}
}
+ 3
yeah an instantiated prefab
0
Ok thank you very much 😃
0
is "Random" object a prefab ?
0
Ok