* Control.cs: Don't do anything in WmShowWindow if the control has been
[mono.git] / mcs / tests / gtest-linq-02.cs
1 // Compiler options: -langversion:linq
2
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6
7 class Test
8 {
9         public static int Main ()
10         {
11                 int[] int_array = new int [] { 0, 1 };
12                 
13                 IEnumerable<int> e;
14                 int pos;
15
16                 e = from int i in int_array select i;
17                 pos = 0;
18                 foreach (int actual in e) {
19                         Console.WriteLine (actual);
20                         if (int_array [pos++] != actual)
21                                 return pos;
22                 }
23                 
24                 e = from int i in int_array select 19;
25                 pos = 0;
26                 foreach (int actual in e) {
27                         Console.WriteLine (actual);
28                         if (actual != 19)
29                                 return actual;
30                 }
31                 
32                 Console.WriteLine ("OK");
33                 return 0;
34         }
35 }