public AAddress(AAddress other) { if (other.StreetName == null) { throw new ArgumentNullException(paramName: nameof(StreetName)); } StreetName = other.StreetName; HouseNumber = other.HouseNumber; }
// Makes a copy of other my copying into self public PPerson(PPerson other) { if (other.Names == null) { throw new ArgumentNullException(paramName: nameof(Names)); } if (other.Address == null) { throw new ArgumentNullException(paramName: nameof(Address)); } Names = other.Names; Address = new AAddress(other.Address); }
public PPerson(string[] names, AAddress address) { if (names == null) { throw new ArgumentNullException(paramName: nameof(names)); } if (address == null) { throw new ArgumentNullException(paramName: nameof(address)); } Names = names; Address = address; }