I have an event delegate that is defined as follows:
public delegate void CallbackDelegate(Data data); public event CallbackDelegate OnDataComplete;
I raise the event asynchronously:
// Raise the OnDataComplete event OnDataComplete.BeginInvoke(new Data(), null, null);
Subsequently, the BeginInvoke signature looks like this:
IAsyncResult CallbackDelegate.BeginInvoke(Data data, AsyncCallback callback, object @object)
In most examples, I saw that BeginInvoke is called with the @object parameter, which is null , but I can not find the documentation that explains what the purpose of this parameter is.
So what is the purpose of this parameter? What can we use for this?
multithreading c # events begininvoke delegates
Kiril
source share