I would like to create a list of the class objects but cant get it working
public class WriteAnswer
{
public string question1;
public string answer1;
public string answer2;
public string answer3;
public WriteAnswer(string q1, string a1, string a2, string a3)
{
question1= q1;
answer1= a1;
answer2= a2;
answer3= a3;
}
}
Then I would like to make a list of few question and answers objects:
public List<WriteAnswer> qa = new List<WriteAnswer>();
And add new objects:
private void Start()
{
qa.Add("What is it?", "Answer1", "Answer2", "Answer3");
}
It doesnt want to work. Can you help me with this one, please?