I usually generate random stuff in the following manner:
Random random = new Random(DateTime.Now.Millisecond);
for (int i = 0; i < 100; i++)
{
Console.WriteLine(random.Next(0, 100));
}
I was wondering whether there is a difference if I put the Random instantiation within the loop:
for (int i = 0; i < 100; i++)
{
Random random = new Random(DateTime.Now.Millisecond);
Console.WriteLine(random.Next(0, 100));
}
Which is more random or they are the same?