title: Trying to understand C# TaskContinuationOptions.OnlyOnFaulted
body: <p>I am trying to understand C# <code>TaskContinuationOptions.OnlyOnFaulted</code> and I wrote this simple example. I expect the continuation task to not run because there was no exception in the antecedent task but it runs anyway.</p>
  
  <pre><code>var task = Task.Factory
      .StartNew(() =&gt; { Console.WriteLine("Hello world!"); })
      .ContinueWith((x, y) =&gt;
      {
          Console.WriteLine("This should not get printed!");
      }, TaskContinuationOptions.OnlyOnFaulted);
  </code></pre>