To add further to others' answers.
This is Asynchronous call.
As per MSDN ,
The BeginInvoke
method initiates the asynchronous call. It has the same parameters as the method that you want to execute asynchronously, plus two additional optional parameters. The first parameter is an AsyncCallback
delegate that references a method to be called when the asynchronous call completes. The second parameter is a user-defined object that passes information into the callback method. BeginInvoke
returns immediately and does not wait for the asynchronous call to complete. BeginInvoke
returns an IAsyncResult
, which can be used to monitor the progress of the asynchronous call.
The EndInvoke
method retrieves the results of the asynchronous call. It can be called any time after BeginInvoke
. If the asynchronous call has not completed, EndInvoke
blocks the calling thread until it completes. The parameters of EndInvoke
include the out
and ref
parameters (<Out> ByRef and ByRef in Visual Basic)
of the method that you want to execute asynchronously, plus the IAsyncResult
returned by BeginInvoke
Look at the link for further info.