C#没有拷贝构造函数。因为他的对象都可以用克隆实现或拷贝实现。也就是方法 Clone()和Copy()

解决方案 »

  1.   

    from 
    http://www.parkscomputing.com/dotnet/csharpfaq/oo/default.aspx#faq_004Does C# have copy constructors?
    No. Objects in C# are always created by reference rather than by value, so a copy constructor is never implicitly called the way that it might be in C++. That being said, nothing prevents a class from implementing a constructor that accepts a reference to an object of the same type. This constructor may be called explicitly. class Abc
    {
        public int xyz;    public Abc()
        {
            xyz = 1;
        }    public Abc(Abc existingObject)
        {
            xyz = existingObject.xyz;
        }
    }class MainClass
    {
        static void Main(string[] args)
        {
            Abc firstAbc = new Abc();
            firstAbc.xyz = 123;        Abc secondAbc = new Abc(firstAbc);
            System.Console.WriteLine(secondAbc.xyz); 
        }
    }
      

  2.   

    saucer(思归) 的方法其实是构造函数实现的意义上的拷贝构造函数。,但C#本身在没有拷贝构造函数的概念,因为他对于引用类型都是按引用传递的,除非指明按值传递。