ppp
ppp

Reputation: 303

AsyncResult class not getting in callback function

here my code-

DateTimeDelegate dtdel = new DateTimeDelegate(GetCurrentDateTimeAt);
IAsyncResult async = dtdel.BeginInvoke(UserContext.Latitude.ToString(), UserContext.Longitude.ToString(), new AsyncCallback(DateTimeCallBack), null);  

...

public DateTimeCallBack(IAsyncResult asy)
    {
        AsyncResult result = (AsyncResult)asy; // error 'AsyncResult' could not be found

    }

what should I do?

Upvotes: 1

Views: 286

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038900

The AsyncResult class is defined in the System.Runtime.Remoting.Messaging namespace. Make sure you have included it. You may also checkout the following article on MSDN.

Upvotes: 1

Related Questions