linux-packaging-mono/mcs/tests/test-iter-20.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

31 lines
510 B
C#

//
// This was a bug which was triggered because I removed a routine
// inadvertently. The routine was restored, and now the scopes
// are initialized
//
using System;
using System.Collections;
using System.Reflection;
public class CustomDict {
ArrayList data;
public CustomDict() {
foreach (object o in this)
Console.WriteLine (o);
}
public IEnumerator GetEnumerator() {
if (data != null)
yield return 1;
}
}
public class Tests
{
public static void Main () {
new CustomDict ();
}
}