Beispiel #1
0
 public Object Clone()
 {
     Resume obj = new Resume(this.work);
     obj.name = this.name;
     obj.sex = this.sex;
     obj.age = this.age;
     return obj;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            Resume a = new Resume("小明");
            a.SetPersonalInfo("男", "23");
            a.SetWorkExperience("2010-2015", "XXX公司");

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

            Resume c = (Resume)a.Clone();
            c.SetWorkExperience("1994-2006", "ZZ公司");

            a.DisPlay();
            b.DisPlay();
            c.DisPlay();

            Console.ReadKey();
        }