Ejemplo n.º 1
0
        public QuestionBase GetQuestionById(int questionId)
        {
            QuestionBase result = (from question in questions
                                   where question.Id == questionId
                                   select question).FirstOrDefault();

            return(result);
        }
Ejemplo n.º 2
0
        public void RemoveQuestionById(int questionId)
        {
            QuestionBase question = GetQuestionById(questionId);

            if (question != null)
            {
                int pos = questions.IndexOf(question);
                this.questions.RemoveAt(pos);
            }
        }
Ejemplo n.º 3
0
 public int AddQuestion(QuestionBase question)
 {
     this.questions.Add(question);
     return(question.Id);
 }