2 using System.Collections.Generic;
6 class Disposable : IDisposable
8 public static int Counter;
10 public void Dispose ()
24 dynamic d = new List<int> { 5, 10, 7 };
26 foreach (var v in d) {
35 dynamic c = new int [] { 5, 7 };
47 dynamic[] c = new dynamic [] { (byte) 1, 7 };
54 Console.WriteLine (total);
60 dynamic d = new Disposable ();
67 if (Disposable.Counter != 1)
71 using (dynamic u = new Disposable ()) {
76 if (Disposable.Counter != 2)
79 using (dynamic u = new Disposable ()) {
86 public static int Main ()
89 if (!t.ForEachTest ())
92 if (!t.ForEachTest_2 ())
95 if (!t.ForEachTest_3 ())
101 Console.WriteLine ("ok");