コード例 #1
0
        public Question GetQuestion()
        {
            var questionsFromCurrentCategory = AllQuestions.Where(x => x.Category == CurrentCategory).ToList();
            var number = Randomizer.GetRandomNumber(8);

            return(questionsFromCurrentCategory[number - 1]);
        }
コード例 #2
0
 public static IEnumerable <QuestionBase> GetQuestionsByLevel(Level level)
 {
     return(AllQuestions.Where(q => q.Theme.Level == level));
 }