2010-05-13 Rodrigo Kumpera <rkumpera@novell.com>
[mono-project.git] / mcs / tests / gtest-493.cs
bloba6fc4c446e0dc82aed830fc413730c76dda61513
1 using System;
2 using System.Collections;
3 using System.Collections.Generic;
5 namespace MonoGenericIteratorTest
7 public class MyType
11 public abstract class MyCollectionBase<T> : Dictionary<string, T>
13 public new virtual IEnumerator GetEnumerator ()
15 return Values.GetEnumerator ();
19 public class MyCollection : MyCollectionBase<MyType>
23 class MainClass
25 public static void Main (string[] args)
27 MyCollection myCollection = new MyCollection ();
29 foreach (MyType item in myCollection) {
30 Console.WriteLine ("Success.");