Beispiel #1
0
        static void Main(string[] args)
        {
            Resume a = new Resume("大鸟");
            a.SetPersonalInfo(1, 30);
            a.SetWorkExperience("2000-2006", "XX公司");

            Resume b = (Resume)a.Clone();
            b.SetWorkExperience("2003-2005", "YY公司");

            Resume c = (Resume)a.Clone();
            c.SetPersonalInfo(2, 25);
            c.SetWorkExperience("2013-2016", "ZZ公司");

            a.Display();
            b.Display();
            c.Display();

            ResumeDepth a1 = new ResumeDepth("大鸟");
            a1.SetPersonalInfo(1, 30);
            a1.SetWorkExperience("2000-2006", "XX公司");

            ResumeDepth b1 = (ResumeDepth)a1.Clone();
            b1.SetWorkExperience("2003-2005", "YY公司");

            ResumeDepth c1 = (ResumeDepth)a1.Clone();
            c1.SetPersonalInfo(2, 25);
            c1.SetWorkExperience("2013-2016", "ZZ公司");

            a1.Display();
            b1.Display();
            c1.Display();

            Console.Read();
        }
        static void Main(string[] args)
        {
            Resume resumeA = new Resume("大鳥");

            resumeA.SetPersonlInfo("男", 29);
            resumeA.SetWorkExperience("1998-2000", "XX公司");

            Resume resumeB = (Resume)resumeA.Clone();

            resumeB.SetWorkExperience("1998-2006", "YY企業");

            Resume resumeC = (Resume)resumeA.Clone();

            resumeC.SetPersonlInfo("男", 24);
            resumeC.SetWorkExperience("1998-2003", "ZZ企業");

            resumeA.Display();
            resumeB.Display();
            resumeC.Display();

            Console.WriteLine("\n");

            ConcretePrototype1 prototype1 = new ConcretePrototype1("My name is YoChen");
            ConcretePrototype1 prototype2 = (ConcretePrototype1)prototype1.Clone();

            Console.WriteLine($"Clone: {prototype2.Id}");

            Console.ReadLine();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Resume rs1 = new Resume("HarKey");

            rs1.SetPersonalInfo("Boy", "26");
            rs1.SetWorkExperience("10/2017-12/2018", "3g");

            Resume rs2 = (Resume)rs1.Clone();

            rs2.SetWorkExperience("06/2016-08/2017", "Neware");

            rs1.Display();
            rs2.Display();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Resume a = new Resume("Jack");

            a.SetWorkExperience(18, "2020", "AA.INC");
            a.Display();

            Resume b = a.DeepCopy();

            b.SetCompany("BB.INC");
            b.Display();

            a.Display();

            Console.ReadLine();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Resume a = new Resume("大鸟");
            a.SetPersonalInfo("男","29");
            a.SetWorkExperience("1998-2000", "XX公司");

            Resume b = (Resume)a.Clone();
            //b.SetWorkExperience("1998-2006", "YY企业");

            Resume c = (Resume)a.Clone();
            //c.SetWorkExperience("1998-2003", "ZZ企业");

            a.Display();
            b.Display();
            c.Display();

            Console.Read();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            Resume a = new Resume("Ben");

            a.SetPersonalInfo("man", "30");
            a.SetWorkExperience("2016", "conmpany_a");
            a.Display();
            Resume b = (Resume)a.Clone();

            b.SetPersonalInfo("man", "30");
            b.SetWorkExperience("2017", "conmpany_b");
            b.Display();

            Resume c = (Resume)a.Clone();

            c.SetPersonalInfo("man", "30");
            c.SetWorkExperience("2018", "conmpany_c");
            c.Display();
        }
        static void Main(string[] args)
        {
            Resume a = new Resume("大鸟");

            a.SetPersonalInfo("男", "29");
            a.SetWorkExperience("1998-2000", "xx公司");

            Resume b = (Resume)a.Clone();

            b.SetWorkExperience("1998-2006", "YY企业");

            Resume c = (Resume)a.Clone();

            c.SetPersonalInfo("男", "24");
            c.SetWorkExperience("1998-2003", "ZZ企业");

            a.Display();
            b.Display();
            c.Display();
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            Resume a = new Resume("大鸟");

            a.SetPersonalInfo(1, 30);
            a.SetWorkExperience("2000-2006", "XX公司");

            Resume b = (Resume)a.Clone();

            b.SetWorkExperience("2003-2005", "YY公司");

            Resume c = (Resume)a.Clone();

            c.SetPersonalInfo(2, 25);
            c.SetWorkExperience("2013-2016", "ZZ公司");

            a.Display();
            b.Display();
            c.Display();

            ResumeDepth a1 = new ResumeDepth("大鸟");

            a1.SetPersonalInfo(1, 30);
            a1.SetWorkExperience("2000-2006", "XX公司");

            ResumeDepth b1 = (ResumeDepth)a1.Clone();

            b1.SetWorkExperience("2003-2005", "YY公司");

            ResumeDepth c1 = (ResumeDepth)a1.Clone();

            c1.SetPersonalInfo(2, 25);
            c1.SetWorkExperience("2013-2016", "ZZ公司");

            a1.Display();
            b1.Display();
            c1.Display();


            Console.Read();
        }
Beispiel #9
0
        public static void Main(string[] args)
        {
            var resume = new Resume("Bryan");

            resume.SetPersonalInfo("男", "28");
            resume.SetWorkExperience("1998-2000", "XX公司");

            var resume2 = (Resume)resume.Clone();

            resume2.SetWorkExperience("1998-2006", "YY公司");

            var resume3 = (Resume)resume.Clone();

            resume3.SetPersonalInfo("男", "25");

            resume.Display();
            resume2.Display();
            resume3.Display();

            Console.Read();
        }