int answer; if (radiobutton2.Checked) answer = 9; else answer = 0;
I suggest that you work through some tutorials to gain a better understanding of c#. Feel free to ask for help when you don't understand something though, of course.
how do I code if radiobutton2 is checked then answer=9;
how do I code if radiobutton2 is checked then answer=9;
thundur
if (radiobutton2.Checked)
answer = 9;
else
answer = 0;
I suggest that you work through some tutorials to gain a better understanding of c#. Feel free to ask for help when you don't understand something though, of course.