2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / tests / test-713.cs
blob10bdbb67c6fc41208a0babfec843c1b1d9749499
1 using System;
3 class DispBar : IDisposable
6 public void Dispose ()
8 Console.WriteLine ("DispBar.Dispose");
12 class Foo
15 public IDisposable GetBar ()
17 return new DispBar ();
21 class Test
24 static Foo foo = new Foo ();
26 public static bool TryThing ()
28 using (IDisposable disp = foo.GetBar ()) {
30 bool bang = false;
31 foo = null;
32 return bang;
36 public static void Main ()
38 TryThing ();