示例#1
0
        public static List <Question> getQuestion(string q, string a, string text = "")
        {
            List <Question> result      = new List <Question>();
            List <string>   allInitials = pinyin.getAllPossibleInitials(q);

            foreach (string s in allInitials)
            {
                if (String.IsNullOrWhiteSpace(text))
                {
                    result.Add(new Question(QuestionIndex.getPreciseIndex(s), q, a, q));
                }
                else
                {
                    result.Add(new Question(QuestionIndex.getPreciseIndex(s), q, a, text));
                }
            }
            return(result);
        }