title: how to assign Task return value to some variable in TPL C#
body: <p>This is my <code>C#</code> function</p>
  
  <pre><code>public async Task GetAttendance(IEnumerable&lt;Zone&gt; zones)
  {
      try
      {
          foreach (var zone in zones)
          {
              var req = new AttendeeRequestTO(zone.StartTime, zone.EndTime, zone.ZoneId.ToString(), accessToken);
  
              //THROWING COMPILE TIME ERROR
              zone.AttendanceCount = Task.Factory.StartNew(() =&gt; _vClient.GetAttendeesCount(req));
          }
      }
      catch (Exception ex)
      {
      }
  }
  </code></pre>
  
  <p>Error </p>
  
  <blockquote>
    <p>Error   CS0029  Cannot implicitly convert type 'System.Threading.Tasks.Task>' to 'int?'   </p>
  </blockquote>
  
  <p><strong>I don't want to apply await for each Task as each Task is independent &amp; I want to each Task to run on its own context without waiting for any other Task.</strong></p>
  
  <p>I mean <br/>
   Task T1 - GO to API , get the value &amp; set the count <br/>
   Task T2 - GO to API , get the value &amp; set the count <br/>
   Task T3 - GO to API , get the value &amp; set the count</p>
  
  <p>T2 should not wait for T1 to complete, T3 should not wait for T2 to complete &amp; so on.</p>
  
  <p>How do I assign the value of each Task's output to <code>zone.AttendanceCount</code>?</p>