C# background worker while loop

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-05T16:56:23Z Indexed on 2010/04/05 17:03 UTC
Read the original article Hit count: 129

Filed under:

What i'm trying to create is a background worker that executes a few processes every 30seconds. But I want this while loop to execute for as long as the program is launched. here is what I am using:

    private void watcherprocess1()
    {
        backgroundWorker1.RunWorkerAsync();

    }  
    private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
    {
        while(
        Thread.Sleep(30000);
        specficView2();
        makeFormlist2();
        populateListview2();
    }

My main issue is ai can think of a good while loop to keep this running

© Stack Overflow or respective owner

Related posts about c#