seeding random numbers

I'm trying to generate several random numbers with the same bounds, but every number is always the same. How would I go about seeding the random number generator?
[163 byte] By [jkidd01] at [2007-12-29]
# 1
Hi !


I'm not sure if I understand you right, but if you would like to get random numbers you should use Random foo = new Random();
If you do not pass a parameter to the constructor, the random seed will be initialized by a time dependent value - so you get unique numbers each time.
You may also pass a fixed random seed to the constructor if you want a fixed order of numbers for each instance of the Random object.

foo.Next(); will get the randomized values. You may pass min and max values here.

.ohAko. at 2007-9-4 > top of Msdn Tech,Visual C#,Visual C# Language...