add ISafeSerializationData
[mcs.git] / tests / gtest-lambda-22.cs
blob724419da5c1346795c62aa2489f26782cb210b0b
1 using System.Linq;
3 //
4 // This is a lambda test for situation when parent is infering return types and child not
5 //
7 public class Product
9 public int CategoryID;
10 public decimal UnitPrice;
13 class MainClass
15 public static void Main ()
17 Product[] products = new[] {
18 new Product { CategoryID = 1, UnitPrice = 1m }
21 var categories = from p in products
22 group p by p.CategoryID into g
23 select new {
25 ExpensiveProducts = from p2 in g
26 where (p2.UnitPrice > g.Average (p3 => p3.UnitPrice))
27 select p2