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