Example #1
0
        public void Display()
        {
            Apprentice a1 = new Apprentice
            {
                ID      = 1000,
                Name    = "Peter Parker",
                Address = "2525 Hero Dr",
            };

            Apprentice a2 = new Apprentice
            {
                ID      = 1002,
                Name    = "Thor",
                Address = "Asgard dr",
            };
            List <Apprentice> heros = new List <Apprentice>();

            heros.Add(a1);
            heros.Add(a2);

            foreach (var item in heros)
            {
                Console.WriteLine($"I am here # {item.ID} and my name is {item.Name} + my address is {item.Address}");
            }

            // Console.ReadLine();
        }
Example #2
0
        public static void Main(string[] args)
        {
            Apprentice a = new Apprentice();

            a.Display();

            Console.ReadLine();

            Durango d = new Durango();
            int     total;

            total = d.preformAddition(4, 20);

            Console.WriteLine(total);
            Special();
        }