Hi @Kalyan A,
You could try below code:
private string[] failedQuestions;
private int failedIndex;
public QuizCardBase()
{
failedQuestions = new string[100];
failedIndex = 0;
}
protected void OptionSelected(string option)
{
if (option == Questions[questionIndex].Answer)
{
score++;
}
else
{
failedQuestions[failedIndex] = Questions[questionIndex].QuestionTitle;
failedIndex++;
}
questionIndex++;
}
protected void DisplayFailedQuestions()
{
for (int i = 0; i < failedIndex; i++)
{
Console.WriteLine(failedQuestions[i]);
}
}
Best Regards,
Jalpa Panchal
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.