Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

MultiThreading in Windows Apps

$
0
0

Hi,

  I have a couple of threads that I want to execute in my button on_Click event. I would like the second thread to start executing only upon the completion of the first.

How can I do that? My code looks like this:

 private void btnAudit_Click(object sender, EventArgs e)
        {

            FindNewAccountsThread = new Thread(() => FindNewAccounts());
            FindNewAccountsThread.Start();


            AuditThread = new Thread(() => AuditData());
            AuditThread.Start();

  }//Audit


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>