title: Update UI Label from Task.Continuewith
body: <p>I am working on a Winform Application. The <code>Method</code> is started by a <strong>BackgroundWorker</strong> Thread. I am sorry. I did not mention this earlier.</p>
  
  <pre><code>private void Method()
  {
   tasks[i] = Task.Factory
             .StartNew(() =&gt; fileProcessor.ProcessEachMachine(mdetail))
             .ContinueWith(UpdateLabel, TaskContinuationOptions.OnlyOnRanToCompletion);
  }
  </code></pre>
  
  <p>I have a long running function <code>ProcessEachMachine</code>. In the continuation function <code>UpdateLabel</code> I want to access UIlabel and update the status. </p>
  
  <pre><code>private void UpdateLabel()
  {
     progressLbl.Text = "updated";
  }
  </code></pre>
  
  <p>But the label is not getting updated. How to access UILabel and update the text of it.?</p>