public Page1(List <QuestionData> questions) { InitializeComponent(); Questions = questions; Question = new QuestionData() { QuestionText = "At Dartmouth College in 1964 John Kemeny and Thomas Kurtz invented ... ?", CorrectAnswer = "Basic" }; QLabel.Text = Question.QuestionText; }
public Page2(List <QuestionData> questions) { Questions = questions; InitializeComponent(); Question = new QuestionData() { QuestionText = "Who invented C++ ?", CorrectAnswer = "Bjarne Stroustrup" }; QLabel.Text = Question.QuestionText; }
public Page5(List <QuestionData> questions) { Questions = questions; Question = new QuestionData() { QuestionText = "When was the Turing Machine invented?", CorrectAnswer = "1936" }; InitializeComponent(); QLabel.Text = Question.QuestionText; }
public Page3(List <QuestionData> questions) { Questions = questions; Question = new QuestionData() { QuestionText = "Which of the following operator represents a conditional operation in C#?", CorrectAnswer = "?:" }; InitializeComponent(); QLabel.Text = Question.QuestionText; }
public Page4(List <QuestionData> questions) { Questions = questions; Question = new QuestionData() { QuestionText = "Which of the following is the default access specifier of a class member variable?", CorrectAnswer = "Private" }; InitializeComponent(); QLabel.Text = Question.QuestionText; }
public static QuestionData Anwser(this QuestionData question, string answer) { question.Answer = answer; return(question); }