OK, another LINQ question. How do I do an \"IN\" condition using LINQ. I have an IEnumerable list of myObject and want to do something like myObject.Description in(\'Help\',
Use Contains on a collection:
Contains
string[] descriptions = { "Help", "Admin", "Docs" }; var query = from foo in list where descriptions.Contains(foo.Description) select ...;
(For larger collections, a HashSet might be better.)
HashSet