void CallBackMethod(IAsyncResult ar) { GetMessage del = (GetMessage)ar.AsyncState; string str = del.EndInvoke(ar); Console.WriteLine(str); }