Guest User

Untitled

a guest
Nov 14th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class QuestionAndAnswers
  2. {
  3. string _preliminaryQuestion;
  4. public string PreliminaryQuestion {
  5. get => Parameters != null ? string.Format(_preliminaryQuestion, Parameters) : _preliminaryQuestion;
  6. set => _preliminaryQuestion = value;
  7. }
  8.  
  9. string _repeatedQuestion;
  10. public string RepeatedQuestion {
  11. get => Parameters != null ? string.Format(_repeatedQuestion, Parameters) : _repeatedQuestion;
  12. set => _repeatedQuestion = value;
  13. }
  14.  
  15. public IEnumerable<Answer> PossibleAnswers { get; set; }
  16.  
  17. public string[] Parameters { get; set; }
  18.  
  19. public QuestionAndAnswers(string question, IEnumerable<Answer> possibleAnswers, string repeatedQuestion = null)
  20. {
  21. PreliminaryQuestion = question;
  22. PossibleAnswers = possibleAnswers;
  23. RepeatedQuestion = repeatedQuestion ?? question;
  24. }
  25. }
Add Comment
Please, Sign In to add comment