tags:

views:

43

answers:

1

In VBA I indicate:

If Option1.Value Then
    TextTo= "Meters"
End If

How can I use (.Value) in C#?

+1  A: 

I'm not sure what type of object Option1 is. My guess is that it's a RadioButton. To get the value of a RadioButton (if it's checked or not), try:

bool isChecked = yourRadionButton.Checked;

isChecked will be true if yourRadionButton is checked.

So your code might look like:

if (yourRadionButton.Checked) {
   TextTo = "Meters";
}

If this doesn't help, please clarify.

Jay Riggs