copy constructor in c# code example
Example: copy constructor 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;
}
}