Jan 13
ThreadPool is performance-wise faster.
ThreadPool is fire and forget in the sense that BeginInvoke should always be paired with EndInvoke because exceptions are passed to the EndInvoke and should be handled here to avoid the exceptions lingering in memory.
If you don’t care about exceptions and have a relatively simple delegate that should be invoked, use ThreadPool.
If you have more complex delegates where things could go wrong that you care about, use Delegate.BeginInvoke/EndInvoke.
An example of how to use the ThreadPool.QueueUserWorkItem and lambda expressions:
ThreadPool.QueueUserWorkItem(callback => SomeMethod(someArgument));
Alternatively:
WaitCallback waitCallback = new WaitCallback(callback => { x => x*x});
ThreadPool.QueueUserWorkItem(waitCallback);

(4.90 out of 5)