title: C# Progress Reporting
body: <p>The following code fails to compile:   </p>
  
  <pre><code>async Task Foo (Action&lt;int&gt; onProgressPercentChanged)
  {
      return Task.Run (() =&gt;
      {
          for (int i = 0; i &lt; 1000; i++)
          {
              if (i % 10 == 0) onProgressPercentChanged (i / 10);
  
          }
      });
  }
  </code></pre>
  
  <p>due to the following error:</p>
  
  <p>Severity    Code    Description Project File    Line    Suppression State
  Error   CS1997  Since 'Nutshell.Foo(Action)' is an async method that returns 'Task', a return keyword must not be followed by an object expression. Did you intend to return 'Task'?</p>
  
  <p>but this is done exactly as shown in the book. Is there something I'm missing?</p>