I am newish to programing and very much a C# newbie. I am trying to learn by doing as much as by reading from books and have set myself the challenge of creating a small program to select 6 numbers from 49 at random. Basically it is a lottery number selector program.
I have a liststring with values 1,2,3 etc to 49. These are then selected and configured as the text property of labels. As they are selected the Count method is used to track of the numbers selected. These numbers are then removed from the liststring.
My program works fine the first time my generate button is clicked. What I want to know is how to reset the program so that if the generate button is clicked again the full list of numbers is available within the liststring. Eg. Reset the count to null.
Any help would be appreciated.
Kind regards
I have a liststring with values 1,2,3 etc to 49. These are then selected and configured as the text property of labels. As they are selected the Count method is used to track of the numbers selected. These numbers are then removed from the liststring.
My program works fine the first time my generate button is clicked. What I want to know is how to reset the program so that if the generate button is clicked again the full list of numbers is available within the liststring. Eg. Reset the count to null.
Any help would be appreciated.
Kind regards