title: Assigning anonymous method to delegate using parentheses gives compiler error?
body: <p>Given the following sample codes:</p>
  
  <pre><code>static void SomeMethod()
  {
    Action&lt;int,int&gt; myDelegate;
  
    //...
  
    myDelegate = delegate { Console.WriteLine( 0 ); };
    myDelegate = delegate() { Console.WriteLine( 0 ); };  // compile error
  
  }
  </code></pre>
  
  <p>What is the difference between</p>
  
  <pre><code>myDelegate = delegate { Console.WriteLine( 0 ); };
  </code></pre>
  
  <p>and</p>
  
  <pre><code>myDelegate = delegate() { Console.WriteLine( 0 ); };
  </code></pre>
  
  <p>?</p>
  
  <p>In this example, the second statement generates compile error while the first one does not.</p>