I am a beginner in visual basic, I am developing a calculator in which i have the following piece of code.
labeltotal.text = (radiobutton1.Checked) * 1000
My expectation from the above code is that , if the radiobutton1 is checked , the value of the total should be 1000 otherwise it should be 0.
But what i am getting is , if radiobutton1 is checked, total value changes to -1000 otherwise it goes to 0.
But if i use checkbox , i get correct values. For example,
labeltotal.text = (checkbox1.Checkstate) * 1000
it givse me correct values as expected depending on the checkstate.
How can i make the radio button to behave the same way as checkbox in above code?