R
raylopez99
For the public record.
RL
public void IterateOne()
{
Random myRandom = new Random(); //declare Random outside
the iteration
for (int j = 0; j < Max; j++)
{
// Random myRandom = new Random(); //don’t declare
Random here since will not give random results if 'for' loop’s too
fast!
}
}
//Declare your random variable once in your program. Any random
declared within the same time slice will have the same seed.
RL
public void IterateOne()
{
Random myRandom = new Random(); //declare Random outside
the iteration
for (int j = 0; j < Max; j++)
{
// Random myRandom = new Random(); //don’t declare
Random here since will not give random results if 'for' loop’s too
fast!
}
}
//Declare your random variable once in your program. Any random
declared within the same time slice will have the same seed.