How to generate different numbers

Asked

Viewed 10 times

0

Why my code is sending me 2 equal numbers?

for(int i = 0; i < 2; i++)
            { 
                Random numAleatorio = new Random();
                int valorInteiro = numAleatorio.Next(10000, 99999);
                Console.WriteLine(valorInteiro);               
            }
             Console.ReadKey();
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.