3
Reply

C#.net Will Supports Copy Constructor or Not?

P Narasimha

P Narasimha

15y
5.9k
0
Reply

    Yes , C#  will support Copy Constructor.100 %.

    Ex: obj1 a=new obj1(XYZ);

        obj2 b=new obj2(a);

     

    Unlike C++ languages, C# does not provide a copy constructor. If you create a new object and want to copy the values from an existing object, you have to write the appropriate method yourself.

    Hi,

    In c#.net is Support the Copy Constructo or not?

    Thanks,

    narasima