title: Why can I use a lambda expression in place of a callback delegate?
body: <p>I discovered some new C# syntax and do not understand what it means. Here is the syntax-related code:</p>
  
  <p>1)  </p>
  
  <pre><code>BeginInvoke(new Action(() =&gt;
      {
          PopulateUI(ds);
      }));
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>private void OnFormLoad() 
  { 
      ThreadPool.QueueUserWorkItem(() =&gt; GetSqlData()); 
  }
  </code></pre>
  
  <p>What is the meaning of <code>new Action()</code> and what is the meaning of the <code>=&gt;</code> symbol?</p>
  
  <p>The syntax of <code>ThreadPool.QueueUserWorkItem</code> was <code>ThreadPool.QueueUserWorkItem(new WaitCallback(PrintOut), "Hello");</code> but here it shows <code>ThreadPool.QueueUserWorkItem(() =&gt; GetSqlData());</code>, so how does it work? Why is <code>WaitCallback</code> missing? Please explain in detail.</p>
  
  <p>Thanks a lot.</p>