So im going through a tutorial where you call methods, and withing these methods you want to do use the Random(), in the tutorial he calls his method multiple times and get random results, but when I do it, i get the same result multiple times, all the time. Am I doing something wrong?
static void Main(string[] args)
{
MeetAlien();
Console.WriteLine("---------------");
MeetAlien();
Console.WriteLine("---------------");
MeetAlien();
}
static void MeetAlien()
{
Random numberGen = new Random();
string name = "X-" + numberGen.Next(10, 9999);
int age = numberGen.Next(10, 500);
Console.WriteLine("Hi Im " + name);
Console.WriteLine("Im " + age + " age old");
Console.WriteLine("And im an alien :)");
}