法典(可能为伪装):
Person p1 = new Person { First = "John", Last = "Smith" };
Person p2 = new Person { First = "Jane", Last = "Smith" };
我期待着这样做:
bool b1 = Person.CompareOn({"First", "Last"}, p1, p2) // false;
bool b2 = Person.CompareOn({"Last"} , p1, p2) // true;
Is there a predefined method that does this? Or do I have to write one myself?