Take this example code
private void test()
{
Label1.Text = "Function 1 started.";
function1(); //This function takes a while to execute say 15 seconds.
Label2.Text = "Function 1 finished.";
}
If this is run you would never see Function 1 started. So my question is, Are there any c# functions that could be call the show the label change. Something like so
private void test()
{
Label1.Text = "Function 1 started.";
this.DoProcess(); //Or something like this.
function1();
Label2.Text = "Function 1 finished.";
}
I know this could be done using threads but a was wondering whether there was another way.
Thank you in adv.