Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            List <IPerson> serverSide = new List <IPerson>();
            List <IPerson> clientSide = new List <IPerson>();

            Me      me      = new Me("C#", "Jordan", "Williams");
            Brett   brett   = new Brett("CSS", "Brett", "Shearin");
            JackBob jackbob = new JackBob("API", "Jacob", "Henderson");
            Jenn    jenn    = new Jenn("React", "Jenn", "Lawson");
            Austin  austin  = new Austin("Design", "Austin", "Gorman");
            Evan    evan    = new Evan("SQL", "Evan", "Lusky");

            serverSide.Add(me);
            serverSide.Add(evan);
            serverSide.Add(jackbob);

            clientSide.Add(jenn);
            clientSide.Add(austin);
            clientSide.Add(brett);

            foreach (var item in serverSide)
            {
                item.Work();
            }

            foreach (var item in clientSide)
            {
                item.Work();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            List <IStudent> ClientSide = new List <IStudent>();
            List <IStudent> ServerSide = new List <IStudent>();

            Austin austin = new Austin();
            Jordan jordan = new Jordan();
            Jacob  jacob  = new Jacob();
            Brett  brett  = new Brett();
            Evan   evan   = new Evan();
            Jenn   jenn   = new Jenn();

            ClientSide.Add(austin);
            ClientSide.Add(jordan);
            ServerSide.Add(jacob);
            ClientSide.Add(brett);
            ServerSide.Add(evan);
            ClientSide.Add(jenn);

            foreach (IStudent student in ClientSide)
            {
                student.Work();
            }

            foreach (IStudent student in ServerSide)
            {
                student.Work();
            }
        }