I would prefer to modify it to below. In this way the signature of method is clear. It also tells what kind of objects are acceptable. It also tells what kind of properties should be bound together as an object. The grouping of properties is domain specific. It is not anonymous.
I am taking clues from Replace Anonymous Function with Expression.
I would prefer to modify it to below. In this way the signature of method is clear. It also tells what kind of objects are acceptable. It also tells what kind of properties should be bound together as an object. The grouping of properties is domain specific. It is not anonymous.
I am taking clues from
Replace Anonymous Function with Expression
.Note: I am not satisfied with
personPair
as variable name. Feel free to suggest better variable name.