private void NextButton_Click(object sender, EventArgs e) { if (CurrQuestionIndex == exam.Questions.Count - 1) { UpdateCurrQuestion(); QuestionBuilder.Reset(); exam.Questions.Add(new Question()); CurrQuestionIndex++; } else { UpdateCurrQuestion(); CurrQuestionIndex++; LoadCurrQuestion(); if (CurrQuestionIndex == exam.Questions.Count - 1) { NextButton.Text = "New Question"; } } }