I want to print "ms" value in textbox1 by clicking the button firstly, then it should wait for 100ms (one by one), then it show next value.
But it's showing only the last value by clicking button, still after coding Thread.Sleep(100)
. It should show the value like stop watch.
private void button1_Click(object sender, EventArgs e)
{
int ms = 00;
for (ms = 0; ms < 10; ms++)
{
textBox1.Text = ms.ToString();
Thread.Sleep(100);
textBox1.Text = "";
}
}