public static int Main () { Struct s = new Struct ("1"); var t = s.AsyncMethod (); if (!Task.WaitAll (new[] { t }, 2000)) return 1; if (!t.Result) return 2; return 0; }
static int Main() { Struct s = new Struct("1"); var t = s.AsyncMethod(); if (!Task.WaitAll(new[] { t }, 2000)) { return(1); } if (!t.Result) { return(2); } return(0); }