コード例 #1
0
        private static void DemoBunchOfFightingUnits()
        {
            var goodGuys = new Bunch <FightingUnit>();

            goodGuys.Add(new AirSquadron(10));
            goodGuys.Add(new TankUnit(10));
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var things = new Bunch <string>();

            things.Add("Dan");
            things.Add("Don");
            things.Add("Brad Pitt");
            Console.WriteLine($"There are {things.Count} names in my list");
        }
コード例 #3
0
        private static void DemoBunchOfStrings()
        {
            var things = new Bunch <string>();

            things.Add("Dan");
            things.Add("Don");
            things.Add("Brad Pitt");
            Console.WriteLine($"There are {things.Count} names in my list");
        }