<?xml version="1.0"?>
<ErrorDocumentation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorName>CS1579</ErrorName>
  <Examples>
    <string>// 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 ();
        }
}
</string>
    <string>// CS1579: foreach statement cannot operate on variables of type `X' because it does not contain a definition for `GetEnumerator' or is inaccessible
// Line: 11

class X {
}

class Y {
	void yy (X b)
	{
		
		foreach (object a in b)
			;
	}
}
</string>
    <string>// CS1579: foreach statement cannot operate on variables of type `C' because it does not contain a definition for `GetEnumerator' or is inaccessible
// Line: 37

using System;

public class Enumerator
{
	public bool MoveNext ()
	{
		return false;
	}

	public int Current { get; set; }
}


public class Base
{
	public Enumerator GetEnumerator ()
	{
		return new Enumerator ();
	}
}

public class C : Base
{
	new internal Enumerator GetEnumerator ()
	{
		return new Enumerator ();
	}
}

class Test
{
	public static void Main ()
	{
		foreach (var e in new C ())
			Console.WriteLine (e);
	}
}
</string>
    <string>// 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
{
	public Func&lt;IEnumerator&gt; GetEnumerator;
}
</string>
  </Examples>
</ErrorDocumentation>