I am trying to create a helper function (for a class) that takes 2 objects and compares a property for both classes
These properties are just simple types like string , int and bool
Using
Compare(widget1,widget2,x => x.Name)
What am i still
private void CompareValue<T>(Order target, Order source, Func<Order, T> selector) { if(target.selector != source.selector) {
Obviously the code above does not work
Any help would be appreciated, thanks
source share