2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / gtest-linq-03.cs
blob9e8150e9084f9908aef3e69859c54617668b6489
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
7 class WhereTest
9 public static int Main ()
11 int[] int_array = new int [] { 0, 1 };
13 IEnumerable<int> e;
15 e = from int i in int_array where i > 0 select i;
17 if (e.ToList ()[0] != 1)
18 return 1;
20 e = from int i in int_array where i == 0 select i + 1;
22 if (e.ToList ()[0] != 1)
23 return 2;
25 Console.WriteLine ("OK");
26 return 0;