static void Main(string[] args) { var cl = new FirstWCFServiceClient(); //First string str = Console.ReadLine(); Console.WriteLine(cl.First(str)); //SecondAsync Console.WriteLine(Method1Async(cl).Result); //ThirdAsync Console.WriteLine(Method2Async(cl, str).Result); Console.ReadKey(); }
static async Task <string> Method2Async(FirstWCFServiceClient c, string txt) { return(await c.ThirdAsync(txt)); }
static async Task <string> Method1Async(FirstWCFServiceClient c) { return(await c.SecondAsync()); }