public static int GetAgeViaPerson(this IGetPerson getPerson) // I prefer to have the "ViaPerson" in the name in case the object has another Age property. { IPerson person = getPerson.GetPersion(); return(person.GetAge()); }
public static string GetNameViaPerson(this IGetPerson getPerson) { return(getPerson.GetPerson().GetName()); }