title: How to ContinueWith another function with result from previous task when using Tasks?
body: <p>I have WCF connector that should get some small amount of data for me, usually it takes up to 20 seconds to get this data for each item ( which is fine ). I want to use Task to get data for me and then add WinForm controls with value from this Tasks.</p>
  
  <p>I've created list of objects which will consist this data.</p>
  
  <p>Used first Task as the one which updates the list and i want Task that is right away after first Task is done to create controls.</p>
  
  <p>This is the code so far:</p>
  
  <pre><code>List&lt;IpVersionCounter&gt; ipVersionCounters = new List&lt;IpVersionCounter&gt;();
  Task task = Task.Factory.StartNew(() =&gt;
  {
     foreach (var sitein settings.Sites)
     {
         string ip = site.ip;
         string version = "undefined";
  
         using (WcfConnector wcfConnector = 
                      WcfConnector.CreateConnectorWithoutException((ip)))
         {
             if (wcfConnector != null)
             {
                 version= string.Format("{0} {1} {2}", 
                 wcfConnector.VersionController.GetBranchName(), 
                 wcfConnector.VersionController.GetBuildNumber(),
                 wcfConnector.VersionController.GetCurrentVersion());
             }
         }
         counter++;
         ipVersionCounters.Add(new IpVersionCounter
                              {
                              Ip = ip,
                              Version = Version,
                              Counter = counter
                              });
      }
  return ipVersionCounters;
  }).ContinueWith();
  
  AddProgressBar(ipVersionCounter);
  </code></pre>
  
  <p>I don't know if i'm going right way and how to use ContinueWith to pass value from first method to second.</p>