コード例 #1
0
        public static void SimpleNull()
        {
            Hat myHat = new Hat();

            Console.WriteLine($"MyHat is a: {myHat.GetType().Name} and {myHat}");
        }
コード例 #2
0
        public static void Property()
        {
            var myHat = new Hat();

            Console.WriteLine($"MyHat's name is {myHat.AcquiredYear.GetType().Name}: {myHat.AcquiredYear.ToString()}");
        }