Skip to content

Instantly share code, notes, and snippets.

@einarwh
Created February 27, 2013 22:11
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 einarwh/5052290 to your computer and use it in GitHub Desktop.
Save einarwh/5052290 to your computer and use it in GitHub Desktop.
Desugared using-block, expanded into try-finally.
var resource = new Resource();
try
{
// Use the resource here.
}
finally {
if (resource != null)
{
resource.Dispose();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment