using System.Threading.Tasks;
public static void Main()
using(var resource = new Resource()){
Console.WriteLine("Using");
throw new Exception("Using failed");
Console.WriteLine("Exception: " + e);
public class Resource : IDisposable {
Console.WriteLine("Disposing");
throw new Exception("Disposing failed");