示例#1
0
文件: Program.cs 项目: murabye/12lab
        static void Create(Hashtable l)
        {
            l.Clear();
            int num = AskNum("Введите количество элементов");

            Verification.Verification cur;

            for (int i = 0; i < num; i++)
            {
                switch (rand.Next(0, 2))
                {
                case 1:
                    cur = new Test();
                    break;

                case 2:
                    cur = new Exam();
                    break;

                default:
                    cur = new FinalExam();
                    break;
                }
                l.Add(cur.ToString(), cur);
            }
        }
示例#2
0
文件: Program.cs 项目: murabye/12lab
        static void Add(Hashtable l)
        {
            Verification.Verification cur;
            switch (rand.Next(1, 4))
            {
            case 1:
                cur = new Test();
                break;

            case 2:
                cur = new Exam();
                break;

            default:
                cur = new FinalExam();
                break;
            }
            l.Add(cur.ToString(), cur);
        }