The short answer is yes. The long answer isn't too bad either. Let's say we structure a set of classes like this:
public class Quiz
{
public List<Question> Questions { get; set; }
public Quiz() { Questions = new List<Question>(); }
}
public class Question
{
public string Question { get; set; }
public bool Answer { get; set; }
}
Now let's say the UI builds a nice collection of questions for a quiz and over time sets the answer to true or false, yes or no have you, and so at the end we need to save it:
File.WriteAllText(path, JsonConvert.SerializeObject(quiz));
This will save the entire quiz and questions in a JSON format to a file path.
Now we need to reload; this is why I used JSON:
var quiz = JsonConvert.DeserializeObject<Quiz>(File.ReadAllText(path));
After updates have been made to the object (i.e. answers changed) you can run this again:
File.WriteAllText(path, JsonConvert.SerializeObject(quiz));
NOTE: clearly (or it should be clear) each quiz will need its own file.
NOTE: this will also require that you get the Json.NET NuGet package, which can be installed with the NuGet Visual Studio Extension.