List<MyClass> list = // get list
outputList = list.FindAll(delegate(MyClass item)
{
if (condition)
{
return true;
}
}
);
When compiling, we get a strange error message:
"cannot convert from 'anonymous method' to 'System.Predicate
Only when we tried to explicitly cast the anonymous delegate to a Predicate
'System.Predicate
Hope this helps
Thanks and Regards,
Hemant