For an exercise, I must use a switch statement to assign values to
variables based on the 1 or 4 radio buttons selected. Can I do this
without using an extra if-else statement? Some code below:
if (makeOverRadioButton.Checked) {intServiceChoiceLocal = 1;}
else if (hairStylingRadioButton.Checked) {intServiceChoiceLocal = 2;}
else if (manicureRadioButton.Checked) {intServiceChoiceLocal = 3;}
else if (permanentMakeupRadioButton.Checked) {intServiceChoiceLocal
=4;}
switch (intServiceChoiceLocal)
{
case 1:
strServiceNameLocal = "Make Over";
decServiceCostLocal = decMAKEOVER_PRICE;
break;
(code snip, etc.)
-
http://mysite.verizon.net/vze8adrh/news.html (profile) --Tim923 My email is valid.