示例#1
0
 // CopyConstructor approach
 public Person2(Person2 other)
 {
     Names   = other.Names;
     Address = new Address2(other.Address);
 }
示例#2
0
 // CopyConstructor approach
 public Address2(Address2 other)
 {
     StreetName  = other.StreetName;
     HouseNumber = other.HouseNumber;
 }
示例#3
0
 public Person2(string[] names, Address2 address)
 {
     Names   = names ?? throw new ArgumentNullException(paramName: nameof(names));
     Address = address ?? throw new ArgumentNullException(paramName: nameof(address));
 }