颜色问题。。。
switch (Label1.Text)
{
case "1 ":
Label1.Text = "一般 "; break;
case "2 ":
Label1.Text = "紧急 "; break;
Label1.BackColor= "#cccccc "
case "3 ":
Label1.Text = "特急 "; break;
Label1.BackColor= "red "
}
这种写法错了,,报错无法string转换为color
那位给出真确写法
------解决方案-------------------- switch (Label1.Text)
{
case "1 ":
Label1.Text = "一般 ";
break;
case "2 ":
Label1.Text = "紧急 ";
Label1.BackColor = Color.Red;
break;
case "3 ":
Label1.Text = "特急 ";
Label1.BackColor = Color.Red;
break;
}