if (label1.text == "Woot")
label2.text = "WooHoo";
First off you forgot the semicolon at the end of label2.text Secondly, you don't need the brackets unless there is more than one line of code after the conditional. I always add them in simply to make it easier to expand them later on and for readability, but it isn't strictly required. I would have to say don't use if's like that, but the option is there if you so choose. I suppose you could simplify even more if your heart desires, but having it all on one line, but again that is going to get real ugly real quick.
EDIT: Remorseless beat me to it!
This post has been edited by Adkins: 25 February 2010 - 03:43 AM