What is the proper syntax to perform and if statement concerning a buttons color.
Sample code that is non-working:
if (this.btnChat1.BackColor="Color.Salmon")
{
this.btnChat1.BackColor = Color.DarkBlue;
}
else
{
this.btnChat1.BackColor = Color.Salmon;
}
Loading
Ashish SharmaPosted Mar 7, 2008, 12:37 PM
DavidPosted Mar 3, 2008, 4:06 PM
Fixed Code by utilizing == in an if statement instead of =.
DOH!