除了将 IAsyncResult 传递给 AsyncCallback 之外,如何传递?
示例代码:
//Usage
var req = (HttpWebRequest)iAreq;
req.BeginGetResponse(new AsyncCallback(iEndGetResponse), req);
//Method
private void iEndGetResponse(IAsyncResult iA, bool iWantInToo) { /*...*/ }
我想传入示例变量bool iWantInToo
。我不知道如何将其添加到new AsyncCallback(iEndGetResponse)
.