ChristosS ChristosS - 26 days ago 8
C# Question

Wrong code excecution order C#

The programm always excecute the second command first and I don't know why...Is this a bug or is there somthing wrong with the code??

answer += x;
this.lbl1.ResetText();
this.textBox3.Text = Convert.ToString(answer);
this.lbl2.Text += (Convert.ToString(x));
this.lbl2.Text += (" + "); // This is excecuted first
break;

Answer

Provided information is not sufficient. But what I get is you have to use string.Format for string formatting. I hope it will work for you.