hello, im learning to do switch statements, i get the error a constant value is expected. any suggestions?
Code:private bool SearchItemChosen() { switch(false) { case txtName.Text == string.Empty: return true; case txtInfoUSA.Text == string.Empty: return true; case txtAddress.Text == string.Empty: return true; case txtCity.Text == string.Empty: return true; case ddlState.SelectedValue == string.Empty: return true; case txtZip.Text == string.Empty: return true; case txtPhone.Text == string.Empty: return true; case ddlMCO.SelectedValue == string.Empty: return true; default: return false; } }




Reply With Quote