I recently read this thread on MSDN. So I was thinking of using a lamda expression as a way of calling EndInvoke just as a way to make sure everything is nice and tidy. Which would be more correct?
example 1:
Action<int> method = DoSomething;
method.BeginInvoke(5, (a)=>{method.EndInvoke(a);}, null);
Example 2:
Action<int> method = DoSomething;
method.BeginInvoke(5, (a)=>
{
Action<int> m = a.AsyncState as Action<int>;
m.EndInvoke(a);
}, method);