Wednesday, December 23, 2009

System Threading - Lamda Expression

I was writing a small little app and wanted to start threads without having to declare a standalone handles for the ThreadStart. Lamda Expression came in pretty handy.

new System.Threading.Thread( new System.Threading.ThreadStart(() =>
{
Code
})).Start();