copy ctor c# code example
Example: copy ctor c#
class Person
{
private string firstName;
private string lastName;
private byte age;
//Copy Constructor
public Person(Person obj)
{
this.firstName = obj.firstName;
this.lastName = obj.lastName;
this.age = obj.age;
}
}