hi everyone...would like to seek ur help in solving my problem..i have a problem of getting the warning sign...in addition, there an error stated that " control cannot fall through from one case label into another..im using c# language with visual basic 2010 ultimate software..
im also want to put the sign in serial..which means..when the transmitter sends the value of the voltage; the sign will appears accordingly.should i put the for statement for serial data?
tq
switch (waterlevel)
{
case "SAFE":
if (voltage >= 0.0 || voltage <= 0.50)
{
label_result.Text = " SAFE";
label_result.ForeColor = Color.Green;
break;
}
case "WARNING":
if (voltage >= 0.50 || voltage <= 0.60)
{
label_result.Text = " WARNING";
label_result.ForeColor = Color.Yellow;
break;
}
case "DANGER":
if (voltage >= 0.60 || voltage <= 0.70)
{
label_result.Text = " DANGER";
label_result.ForeColor = Color.Red;
break;
}
default:
label_result.Text = "invalid";
break;
}