[w32file] Move MonoIO.Find{First,Next,Close} to managed
[mono.git] / mcs / tests / gtest-520.cs
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
4
5 class A
6 {
7         public void Method ()
8         {
9         }
10 }
11
12 class C : IEnumerable, IEnumerable<A>
13 {
14         public class GetEnumerator
15         {
16         }
17         
18         IEnumerator IEnumerable.GetEnumerator ()
19         {
20                 throw new ApplicationException ();
21         }
22
23         IEnumerator<A> IEnumerable<A>.GetEnumerator ()
24         {
25                 return new List<A> ().GetEnumerator ();
26         }
27 }
28
29 class D : C
30 {
31 }
32
33 public class Test
34 {
35         public static int Main ()
36         {
37                 foreach (var v in new C ()) {
38                         v.Method ();
39                 }
40
41                 foreach (var v in new D ()) {
42                         v.Method ();
43                 }
44
45                 return 0;
46         }
47 }