<p>Why does this lambda expression not compile?</p>

<pre><code>Action a = () =&gt; throw new InvalidOperationException();
</code></pre>

<p>Conjecture is fine, but I would really appreciate references to the C# language specification or other documentation.</p>

<p>And yes, I know that the following is valid and will compile:</p>

<pre><code>Action a = () =&gt; { throw new InvalidOperationException(); };
</code></pre>

<p>The context where I would use something like this is described on <a href="http://jacobcarpenter.wordpress.com/2008/10/06/c-compiler-eccentricity-of-the-day-throwing-lambda/" rel="noreferrer">this blog post</a>.</p>

All the references I can find, from here:
http://msdn.microsoft.com/en-us/library/ms364047(VS.80).aspx#cs3spec_topic4
show that you have two options:
```
```
Action a = () => { throw new InvalidOperationException(); };
```
```
or
```
```
Action a = () => throw new InvalidOperationException()
```
```
Note the missing ; on the end. Yes, it makes no sense to me either. The examples they give  in the spec are:
```
```
x => x + 1                     // Implicitly typed, expression body
x => { return x + 1; }         // Implicitly typed, statement body
(int x) => x + 1               // Explicitly typed, expression body
(int x) => { return x + 1; }   // Explicitly typed, statement body
(x, y) => x * y               // Multiple parameters
() => Console.WriteLine()      // No parameters
```
```
Dunno how much help that is - I can't tell what context you are using it in, and not putting a ; on the end makes no sense in C#
the difference may be that it's an expression body - not a statement - if it doesn't have the {}. Which means that your throw is not valid there, as it's a statement, not an expression!