2 using System.Threading;
3 using System.Threading.Tasks;
7 public static int Main ()
9 Task<int> t = TestMethod ();
14 } catch (InvalidOperationException) {
18 t.RunSynchronously ();
20 } catch (InvalidOperationException) {
23 Console.WriteLine ("ok");
27 async static Task<int> TestMethod ()
29 await Task.Delay (100000);