// Copy Constructor public Person2(Person2 other) { names = other.names; address = new Address2(other.address); }
// Copy Constructor public Address2(Address2 other) { streetName = other.streetName; houseNumber = other.houseNumber; }
public Person2(string[] names, Address2 address) { this.names = names ?? throw new ArgumentNullException(paramName: nameof(names)); this.address = address ?? throw new ArgumentNullException(paramName: nameof(address)); }