Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

a infinite loop in text box update ui c#

private void button1_Click(object sender, EventArgs e)
{
    EndlessTask();
}
async Task EndlessTask()
{
    for(int i = 0; true; i++)
    {
        textBox1.Text = i.ToString();
        await Task.Delay(500);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #infinite #loop #text #box #update #ui
ADD COMMENT
Topic
Name
1+5 =