How to get the parameters passed to the asynchronous method in the callback (not lambda) [closed]?

Up vote -3 down vote favorite share g+ share fb share tw.

Possible Duplicate: How to get the parameters passed to the asynchronous method in the callback I need convert this lambda to method callback var sendRegistrationDelegate = new AsyncSendRegistrationDelegate(AsyncSendRegistrationMethod); sendRegistrationDelegate. BeginInvoke(registrationToUser, label, ar => { var responceFromServer = sendRegistrationDelegate. EndInvoke(ar); if (responceFromServer.

IsError) { SetText(label, registrationToUser. Name + @" " + responceFromServer. ErrorMessage); } else { SetText(label, registrationToUser.

Name + @" " + responceFromServer. Data); } }, null); c# asynchronous lambda callback link|improve this question edited Jul 2 '11 at 11:20Daniel Renshaw6,833524 asked Jul 2 '11 at 11:14simply denis993623 76% accept rate.

– Dark Falcon Jul 2 '11 at 11:19 Very similar question: stackoverflow.com/questions/6516528 – dtb Jul 2 '11 at 11:29 @Dark Falcon, I want to make individually CALLBACK method. – simply denis Jul 2 '11 at 11:54 @dtb, I not understand answer for this questions. – simply denis Jul 2 '11 at 11:55 2 You're question is not making any sense.

Try to clarify. – Dark Falcon Jul 2 '11 at 13:16.

In this snippet: sendRegistrationDelegate. BeginInvoke(registrationToUser, label, ar => // start of method { var responceFromServer = sendRegistrationDelegate. EndInvoke(ar); if (responceFromServer.

IsError) { SetText(label, registrationToUser. Name + @" " + responceFromServer. ErrorMessage); } else { SetText(label, registrationToUser.

Name + @" " + responceFromServer. Data); } } // end of method , null); ...the opening and closing { } mark the beginning and ending of a method, like so: void AsyncCallbackMethod(IAsyncResult ar) { // method body } Your BeginInvoke method would look like: sendRegistrationDelegate. BeginInvoke(registrationToUser, label, new AsyncCallback(AsyncCallbackMethod), null).

Label - unavailable. – simply denis Jul 2 '11 at 13:39.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions