Hi,
I am attempting to select from a List using a linq expression where the range variable is evaluated in a static method that returns boolean. I would like to select the range variable that returns true when the range variable is evaluated using the method.
var result = from rangeVariable in DataSource
where (rangeVariable => Foo.MethodReturnsBoolean(rangeVariable) == true)
select rangeVariable;
I get this error:
Cannot convert Lambda Expression to type 'bool' because it is not a delegate type.
Can anyone explain what is going on, and how I could achieve this?