samedi 18 avril 2015

Random form load c#

I have a short quiz of 4 questions, each question is on a different form (Quiz1, Quiz2 etc). I want to randomly load a form depending if it has been answered or not. I have two AnsweredQuestions and UnansweredQuestions.


Using static Random rnd = new Random(); and int r = rnd.Next(list.Count);


can I pick a number from the list then use a switch to load the next form?


or is there an easier/shorter option?


ps. I had a look at other answers here and tried to come up with my own solution but im having some trouble. Thanks guys.





Aucun commentaire:

Enregistrer un commentaire