This is the part that I am a bit stuck on.
I'm trying to determine what radio button is selected and what to compare it to in the case....
User Profile
Collapse
-
Yes, it is a toy program :) I was trying to come up with different projects to practice with. Finding different methods to accomplish the same thing is very helpful for me. I'll try moving the for loop as you suggested.
Now that I have things working by using if else I'm going to try the drop down list with the switch (although I like the look of the radio buttons better) so I'm still going to try to work them out as well (so I guess...Leave a comment:
-
Thanks for the quick responses,
I replaced the switch case part with the if and else if and that worked. I just need to find another project to use the switch statement in (the part of the book I'm on ;))
Thanks again
if (radio4Sided.Ch ecked)
{
die = randomNumber.Ne xt(1, 4);
this.diceRollNu mbers.Add(die);
...Leave a comment:
-
C#-App Using radio buttons and switch case
I've got a set of six radio buttons inside of a list box and what I'm trying to accomplish is generate a random number all with different ranges (Dice for d&d) depending on what radio button is selected using the switch statement.
Where I'm having the trouble is knowing what radio button is selected so I can use the switch case.
I'm sure this application has been done before but I'm just learning and I thought it...
No activity results to display
Show More
Leave a comment: