Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cboudereau/7a64247192a68d75b208dca68bddaa88 to your computer and use it in GitHub Desktop.
Save cboudereau/7a64247192a68d75b208dca68bddaa88 to your computer and use it in GitHub Desktop.
csharp_nested_using.csx
using System;
public class C {
private class D : IDisposable {
public D()
{
}
public D(IDisposable _):this() {
}
public void Dispose(){
}
}
public void M() {
using (var a = new D())
using (var b = new D(a))
using (var c = new D(b)){
System.Console.WriteLine("hello world");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment