2 using System.Collections.Generic;
4 using System.Linq.Expressions;
10 public static int Main ()
12 int[] i2 = new int [] { 10, 14 };
14 Expression<Func<IEnumerable<int>>> e = () => from i in i2 select i;
15 int sum = e.Compile () ().Sum ();
19 Expression<Func<IEnumerable<long>>> e2 = () => from i in GetValues () select i;
20 var s2 = e2.Compile () ().Sum ();
27 static long[] GetValues ()
29 return new long [] { 9, 2, 3 };