Вы можете создавать вопросы и отвечать на объекты и структурировать их следующим образом:
public class Question {
// The question that is asked.
public string question;
// All known answers
public List<Answer> answers = new List<Answer>();
}
public class Answer {
// The answer text
public string answer;
// The score awarded for this answer.
public int score;
}
Теперь вы можете читать свои данные из любого места, где вы хотите их прочитать, и помещать их в эти объекты. Вот как вы бы создали эти объекты вручную:
var question = new Question { question = "What is the color of the sky", answers = {
new Answer { answer = "It is blue", score = 1},
new Answer { answer = "It is yellow", score = 0}
}
};
Таким образом, у вас есть вопрос и все его ответы в удобной структуре для обработки.