jeudi 31 mars 2016

Method without repeat

I have class called QuestionsAll with constructor

(label question, Button b1, Button b2, Button b3, Button b4)

and method called

questions(string question, string answer1, string answer2, string answer3, string answer4, Button correctanswer)

How I use it in my form:

Random rd = new Random();
int qu = rd.Next(0,4)
QuestionsAll q = new QuestionsAll(label1,Button1,Button2,Button3,Button4) //my question will be in label1, answer1 in Button1......)

if(qu == 1) q.questions("1+1 =", "1", "2", "3", "4", Button2)
if(qu == 2) q.questions("1+2 =", "1", "2", "3", "4", Button3)

And when you click in right question, question changes, but questions and answers repeat. How can i do it with no repeat?




Aucun commentaire:

Enregistrer un commentaire