这里是我的代码 -
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
}
我该怎么办?
答案 0 :(得分:1)
AsyncResult类在System.Runtime.Remoting.Messaging
命名空间中定义。确保你已经包含它。您也可以在MSDN上结帐following article。