-
Notifications
You must be signed in to change notification settings - Fork 5
Home
AlbertoMonteiro edited this page Jun 16, 2011
·
12 revisions
//I want only peoples that has car, and has 'o' on the name
var filter = new FilterExpression();
filter.Start(p => p.Name.Contains("o")).And(p => p.HasCar);
foreach(var item in persons.Where(filter.ResultExpression))
Console.WriteLine(item.Name);
//Or
var filter2 = new FilterExpression();
filter2 = filter2.Start(p => p.Name.Contains("o"));
filter2 = filter2.And(p => p.HasCar);
foreach(var item in persons.Where(filter2.ResultExpression))
Console.WriteLine(item.Name);