I thought I'd seen somewhere a while back an example of where
clause which called a function that gave a bool
result ,and I can't find it again so I'll outline my problem.
I have a collection
Dictionary< string, KeyValuePair < int, int >>
in which I want to have a query for the string
key. On the surface that is simple but unfortunately the string (over which I have no control) is an encoded co-ordinate of a grid cell.
The query is to retrieve entries (as the type of Dictionary
) which fall into a certain part of the grid. Placing a function call cells.Where(c => isWithinArea(c.Key, area))
compiles but does not work. The function never gets called.
I would welcome any suggestions to make this work with a minimum of fuss.