fork download
  1. using System;
  2.  
  3. class Program
  4. {
  5. public static void Main()
  6. {
  7. try
  8. {
  9. using (D d = new D())
  10. {
  11. Console.WriteLine("using D");
  12. }
  13. }
  14. catch (Exception ) { Console.WriteLine("catch"); }
  15.  
  16. Console.ReadKey();
  17. }
  18. }
  19. class D : IDisposable
  20. {
  21. IDisposable a = null;
  22. IDisposable b = null;
  23. public void Dispose()
  24. {
  25. try { a.Dispose(); }
  26. finally
  27. {
  28. try { b.Dispose(); }
  29. finally
  30. {
  31. }
  32. }
  33. }
  34. }
Success #stdin #stdout 0.03s 37968KB
stdin
Standard input is empty
stdout
using D
catch