I need to create a script such as chronometer.
I write a code like following;
for(int i=0;i<50;i++)
{
textBox.Text = i.Tostring();
Task.Delay(100).Wait();
}
The expected output is like a chronometer ; an increasing text by 1 up to 49 started from 0 at textbox.
But I get only 49 after a 49*100 miliseconds pause later.
How can I solve this ?
await Task.Delay(100);