Beispiel #1
0
        public Person WithHomeAddress(MailingAddress HomeAddress)
        {
            var @new = (Person)MemberwiseClone();

            @new.HomeAddress = HomeAddress;
            return(@new);
        }
Beispiel #2
0
        public Person WithWorkAddress(MailingAddress WorkAddress)
        {
            var @new = (Person)MemberwiseClone();

            @new.WorkAddress = WorkAddress;
            return(@new);
        }
Beispiel #3
0
 private static Person MoveHomeAddress(this Person person, MailingAddress homeAddress)
 {
     return(person
            .WithHomeAddress(homeAddress));
 }