Advertisement
Guest User

Untitled

a guest
Jul 25th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1.         [AsyncInterceptor]
  2.         public async Task Bar()
  3.         {
  4.             string s = "H";
  5.             await Foo1();
  6.  
  7.             s += "i";
  8.             await Foo2();
  9.  
  10.             throw new Exception();
  11.             Console.WriteLine(s);
  12.         }
  13.  
  14.         private async Task Foo1()
  15.         {
  16.             await Task.Delay(1000);
  17.             throw new Exception("1");
  18.         }
  19.  
  20.         private async Task Foo2()
  21.         {
  22.             await Task.Delay(1000);
  23.             throw new Exception("2");
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement