Example #1
0
        static void Main(string[] args)
        {
            GradeSheet gradeSheet = new GradeSheet();

            Random random = new Random();

            for (int i = 0; i < 100; i++)
            {
                gradeSheet.AddScore($"Name{i}", random.Next(-3, 110));
            }

            Console.WriteLine("Press any key for continuing...");
            Console.ReadKey();
        }
Example #2
0
        static void Main(string[] args)
        {
            GradeSheet gradeSheet = new GradeSheet();

            gradeSheet.AbnormalEventHandler += (s, e) =>
            {
                Console.WriteLine($"    發現異常分數 {e.Name} / {e.Score}");
            };

            Random random = new Random();

            for (int i = 0; i < 100; i++)
            {
                gradeSheet.AddScore($"Name{i}", random.Next(-3, 110));
            }

            Console.WriteLine("Press any key for continuing...");
            Console.ReadKey();
        }