public static void UseDisposableThing() { using (var foo = new DisposableThing()) { foo.DoSomething(); } }
public static void UseDisposableThing() { try { using (Foo = new DisposableThing()) { Foo.DoSomething(); } } finally { Foo = null; } }