I have a form with few radio buttons that suppose to represent different integer values.
1) Is there a built-in way to put a value "behind" a radio button? an example:
RadioButton rad = new RadioButton();
rad.Value = 5; // This is what im trying to achieve.
2) I have few RadioButtons that are logically related to each other and i want to know which one was selected (without putting them inside a GroupBox control) and get the selected value for that RadioButton. note: I would like to "Iterate" these 3 controls and get the selected one instead of doing 3 IF statements. an example:
RadioButton radColor1 = new RadioButton();
RadioButton radColor2 = new RadioButton();
RadioButton radColor3 = new RadioButton();
// ...
RadioButton radSelected = ?? // Get selected Radio Button from the 3 above.
//here i can get to radSelected.Value