title: Task.ContinueWith method requires task argument?
body: <p>I have a class with two methods, Load() and Process().  I want to be able to run these individually as background tasks, or in sequence.  I like the ContinueWith() syntax, but I'm not able to get it to work.  I have to take a Task parameter on the method I continue with and cannot have a Task parameter on the initial method.</p>
  
  <p>I would like to do it without lambda expressions, but am I stuck either using them, forcing a task parameter on one of the methods, or creating a third method LoadAndProcess()?</p>
  
  <pre><code>void Run()
  {
      // doesn't work, but I'd like to do it
      //Task.Factory.StartNew(MethodNoArguments).ContinueWith(MethodNoArguments);
  
      Console.WriteLine("ContinueWith");
      Task.Factory.StartNew(MethodNoArguments).ContinueWith(MethodWithTaskArgument).Wait();
  
      Console.WriteLine("Lambda");
      Task.Factory.StartNew(() =&gt; { MethodNoArguments(); MethodNoArguments(); }).Wait();
  
      Console.WriteLine("ContinueWith Lambda");
      Task.Factory.StartNew(MethodNoArguments).ContinueWith(x =&gt; { 
              MethodNoArguments(); 
          }).Wait();
  }
  
  void MethodNoArguments()
  {
      Console.WriteLine("MethodNoArguments()");
  }
  
  void MethodWithTaskArgument(Task t = null)
  {
      Console.WriteLine("MethodWithTaskArgument()");
  }
  </code></pre>