i understand that predicates are delegate to function which return bool and take generic param , i understand that when i say
mycustomer => mycustomer.fullname == 1
it actually means:
delegate (Customer mycustomer)
{
return mycustomer.fullName == "John";
}
the paramter im passing in when i pass this lambda expression is :
public delegate bool Criteria<T>(T value)
which is nativly called Predicate
but what i dont understand is what it means when i say mycustomer=>mycustomer.fullname
in customers.OrderBy(mycustomer=>mycustomer.fullname);
how do i implement something like OrderBy ? how do i tell a method which property to do action on ! like the previous example?
by example here is a case i want to make a method which get all values of a collection for a specific property :
list<string> mylist = customers.GetPropertyValues(cus=>cus.Fullname);
thanks in advance.