KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this example which creates 3 expressions and adds them to one array of expression. Now i'd like to know how to do the same in a loop, for a unknown number of expressions. Expression<Func<Product, bool>> filter1 = c => c.City.StartsWith("S"); Expression<Func<Product, bool>> filter2 = c => c.City.StartsWith("M"); Expression<Func<Product, bool>> filter3 = c => c.ContactTitle == "Owner"; Expression<Func<Product, bool>>[] filterExpressions = new Expression<Func<Product, bool>>[] { filter1, filter2, filter3 };
Tags (comma-separated)
Save Edits
Cancel