예제 #1
0
        public static void Main()
        {
            var cathy  = new Person("Cathy", "French");
            var boeing = new Airplane(400, 200, "Boeing");
            var v1     = new Vehicle(12, 20);
            var phil   = new Hunter("Phil", "Anderson", "Pentax");

            var gameObject = new List <Object>()
            {
                cathy,
                boeing,
                v1,
                phil
            };

            foreach (var item in gameObject)
            {
                Console.WriteLine(item.ToString());
            }

            SpartaWrite(phil);
            SpartaWrite(cathy);
        }