I need to pass a predicate that I can call whenever I want (just like a delegate). I'm trying to do something like this (I thought the Predicate delegate would meet my needs):
MyMethod(Predicate,string> pred);
Called as: MyMethod(s => s.Length > 5);
I want to write an inline condition, but call it whenever I want, just like a delegate. How can i do this??
thanks
c #
dotnetdev
source share