title: Returning result from a task that itself contains tasks
body: <p>I have a non Async method that needs to wait on the results of another method.  That method itself builds an array of tasks, and waits on all of them, then returns a boolean result.  I had to make the task that was called Async, and now I cannot get a simple boolean back out of it.  When you read the code below, it all compiles except for the "StartNew   ProcessDbList"   line, it says it cannot convert a Task&lt;bool&gt; to a bool.  How do I arrange this so that I get a simple boolean back that the ProcessInbox method can return?</p>
  
  <pre><code>    public bool ProcessInbox(List&lt;SessionContext&gt; sessionContextList, FsFcsService curSvc)
      {
          bool resultBool = false;
  
          List&lt;SessionContext&gt; tempSessionList = sessionContextList.ToList();
  
          //below is the line that will not compile with the type conversion error
          Task&lt;bool&gt; theTask = Task&lt;bool&gt;.Factory.StartNew(() =&gt; ProcessDbList(tempSessionList, curSvc));
          resultBool = theTask.Result;
          return resultBool;
      }
  
      public async  Task&lt;bool&gt; ProcessDbList(List&lt;SessionContext&gt; sessionList, FsFcsService curSvc) 
      {
  
          bool resultBool = false;
  
          IEnumerable&lt;Task&lt;bool&gt;&gt; TasksList =
              from SessionContext session in sessionList select ProcessDb(session, curSvc);
  
          Task&lt;bool&gt;[] TaskArray = TasksList.ToArray();
  
          // Await the completion of all the running tasks.
          // this line is what forces the method to be Async and return a Task&lt;bool&gt; 
          bool[] resultsArr = await Task.WhenAll(TaskArray);
  
          foreach (bool indivResult in resultsArr)
          {
              if (indivResult)
              {
                  // if any result is true, this method returns true
                  resultBool = true;
                  break;
              }
          }
          // this is where I should probably be returning something other than a simple bool
          return resultBool;
      }
  </code></pre>