I have a method whose function is to return 25 random numbers in a list:
static List<int> criarList()
{
List<int> lista = new List<int>();
for (int i = 0; i < 25; i++)
{
lista.Add(new Random().Next(0, 100));
}
return lista;
}
But for some reason, it only returns the same numbers, ie all the same:
Why is this happening? How to arrange?