I cant get the following code to generate multiple random numbers when I put it in a for loop in c#.
for (int i = 0; i < 5; i++)
Random random = new Random();
sentence += Convert.ToString(random.Next(1, 5));
I would think this would return 5 random numbers but instead it returns the same number 5 times (between 1 & 5)
Any help would be appreciated.
Edited by mikieut, 21 July 2010 - 09:47 PM.