Пример #1
0
        public void CustomClassSample()
        {
            var dict = new Dictionary <MonthDay, string> {
                { new MonthDay(6, 6), "현충일" },
                { new MonthDay(8, 15), "광복절" },
                { new MonthDay(10, 3), "개천절" },
            };
            var md = new MonthDay(8, 15);
            var s  = dict[md];

            Console.WriteLine(s);
        }
Пример #2
0
        public void CustomClassSample()
        {
            var dict = new Dictionary <MonthDay, string> {
                { new MonthDay(3, 5), "珊瑚の日" },
                { new MonthDay(8, 4), "箸の日" },
                { new MonthDay(10, 3), "登山の日" },
            };
            var md = new MonthDay(8, 4);
            var s  = dict[md];

            Console.WriteLine(s);
        }