以下代码报错误:“Resum.Program.Resume”不实现接口成员“System.ICloneable.Clone()”
恳求大侠们帮忙,谢谢了。using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Resum
{
    class Program
    {
        class Resume : ICloneable
        {
            private string name;
            private string sex;
            private string age;
            private string timearea;
            private string company;            public Resume(string name)
            {
                this.name = name;
            }            public void SetPersonalInfo(string sex, string age)
            {
                this.sex = sex;
                this.age = age;
            }            public void SetWorkExperience(string timearea, string company)
            {
                this.timearea = timearea;
                this.company = company;
            }            public void Display()
            {
                Console.WriteLine("{0},{1},{2}", name, sex, age);
                Console.WriteLine("工作经历:{0},{1}", timearea, company);
            }            public object clone()
            {
                return (object)this.MemberwiseClone();
                //Console.WriteLine("成功实现接口");
            }
        }
        static void Main(string[] args)
        {
            Resume a = new Resume("tony");
            a.SetPersonalInfo("man", "12");
            a.SetWorkExperience("1999-2008", "12");            Resume b = (Resume)a.clone;
            b.SetWorkExperience("2008-2009", "1234"); 
            
            Resume c = (Resume)a.clone;
            c.SetPersonalInfo("nan","24");            a.Display();
            b.Display();
            c.Display();            Console.Read();
        }
    }
    
}

解决方案 »

  1.   

    c#是大小写敏感的,你的clone方法名改为Clone就好了。尽量自动生成函数签名,不要手工敲。鼠标悬停在接口上,单击,悬停,会有菜单,选择实现接口,会自动生成签名的。
      

  2.   

    改动3个地方
    注意加红色的地方 
    在2008下编译通过 using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace Resum {
        class Program {
            class Resume : ICloneable {
                private string name;
                private string sex;
                private string age;
                private string timearea;
                private string company;            public Resume(string name) {
                    this.name = name;
                }            public void SetPersonalInfo(string sex, string age) {
                    this.sex = sex;
                    this.age = age;
                }            public void SetWorkExperience(string timearea, string company) {
                    this.timearea = timearea;
                    this.company = company;
                }            public void Display() {
                    Console.WriteLine("{0},{1},{2}", name, sex, age);
                    Console.WriteLine("工作经历:{0},{1}", timearea, company);
                }            public object Clone() {
                    return (object)this.MemberwiseClone();
                    //Console.WriteLine("成功实现接口");
                }
            }
            static void Main(string[] args) {
                Resume a = new Resume("tony");
                a.SetPersonalInfo("man", "12");
                a.SetWorkExperience("1999-2008", "12");            Resume b = (Resume)(a.Clone());            b.SetWorkExperience("2008-2009", "1234");            Resume c = (Resume)(a.Clone());            c.SetPersonalInfo("nan", "24");            a.Display();
                b.Display();
                c.Display();            Console.Read();
            }
        }}
      

  3.   

    Clone是方面 
    调用的时候 有小括号的
    不要忘记 结贴