a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
24 lines
551 B
C#
24 lines
551 B
C#
// Cs1579: foreach statement cannot operate on variables of type `Foo' because it does not contain a definition for `GetEnumerator' or is inaccessible
|
|
// Line: 12
|
|
|
|
using System;
|
|
using System.Collections;
|
|
|
|
public class Test
|
|
{
|
|
public static void Main ()
|
|
{
|
|
Foo f = new Foo ();
|
|
foreach (object o in f)
|
|
Console.WriteLine (o);
|
|
}
|
|
}
|
|
|
|
public class Foo
|
|
{
|
|
internal IEnumerator GetEnumerator ()
|
|
{
|
|
return new ArrayList ().GetEnumerator ();
|
|
}
|
|
}
|