Пример #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");
        }