static void AddCallbackDC(IAsyncResult ar) { try { Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("in AddCallbackDC"); IAddService res = ar.AsyncState as IAddService; if (res != null) { Console.WriteLine("Result returned from WCF service"); Console.WriteLine(res.EndAddDC(ar).Result.ToString()); } } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { if (_addServiceProxy != null) { _addServiceProxy.CloseProxy(); Console.WriteLine("Proxy closed."); } Console.ResetColor(); } }