e.g. 5.20 A Lambda Expression Without a Func
This commit is contained in:
parent
c95b347b15
commit
0e57f0e2e8
@ -21,8 +21,7 @@ namespace automatically_implemented_properties
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Func<Product, bool> categoryFilter = prod => prod.Category == "Soccer";
|
IEnumerable<Product> filteredProducts = products.Filter(prod => prod.Category == "Soccer");
|
||||||
IEnumerable<Product> filteredProducts = products.Filter(categoryFilter);
|
|
||||||
|
|
||||||
foreach (Product prod in filteredProducts)
|
foreach (Product prod in filteredProducts)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user