I’ve got a data structure that is a list of hash tables, like so:
List<Hashtable> lh = new List<Hashtable>();
And a fairly simple LINQ query for this container:
var query = from h in lh where h["foo"] == "bar" select h;
Is there a way to parameterize the where clause? Something like:
var where_clause = where h["foo"] == "bar";
var query = from h in lh where_clause select h;
Depends on what exactly you’re trying to accomplish, but yes you can: