Possible Duplicate:
Why does Thread.sleep() behave in this way
This is a simple code that i have written:
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "first";
Thread.Sleep(1000);
label1.Text = "second";
}
When this code is executed and button is clicked, label1 displays text as only 'second' but not 'first'. I checked using break point, and statement label1.text="first" is executed but label does not display 'first'. Why is this so?