using System;
using System.Collections;
using System.Collections.Generic;
class A
{
public void Method ()
{
}
}
class C : IEnumerable, IEnumerable
{
public class GetEnumerator
{
}
IEnumerator IEnumerable.GetEnumerator ()
{
throw new ApplicationException ();
}
IEnumerator IEnumerable.GetEnumerator ()
{
return new List ().GetEnumerator ();
}
}
class D : C
{
}
public class Test
{
public static int Main ()
{
foreach (var v in new C ()) {
v.Method ();
}
foreach (var v in new D ()) {
v.Method ();
}
return 0;
}
}