with IAsyncResult pattern I'm implementing an asynchornous operation.
The signature of the beginning of my invocation is:
object[] data = new object[] {field1,field2};
AsyncSendMessageToSystem caller = SendMessageToSystem;
caller.BeginInvoke(field1,field2,field3, new AsyncCallback(callbackMethod),data);
When the callbackMethod is invoked, it has as input the data object. The field1 var is intended to be modified inside SendMessageToSystem, but callbackMethod will receive original value, and no the updated one.
How could I pass to callback the updated value?
Thanks!