I get the error below when I try to run the application I am sure its something simple but I dont see it. What I am trying to do it when I click a button I have labeled Play. I
Setup one Random object and initialize it once.
class Form1
{
...
Random rnd = new Random();
}
then to use it every time it is needed
void RandomNumber(int min, int max)
{
int num = rnd.Next(min, max);
...
}
What happens everytime you call new() it re-seeds the random number and you may end up with the same numbers over and over. I have had this happend to me and it killed me