private static void ICloneable() { var john = new Person(new[] { "John", "Smith" }, new Address("London Road", 123)); var jane = john.Clone() as Person; jane.Address.HouseNumber = 321; Console.WriteLine(john); Console.WriteLine(jane); }
public Person(Person other) { Names = other.Names; Address = new Address(other.Address); }