Song Lee

Song Lee

  • NA
  • 47
  • 37.3k

How to bring radio button value to a class.

Oct 25 2014 4:58 PM
Hello,
I am currently working on Winforms, and I have 3 radio buttons that will have different values.

this is what I have on MainForm.cs, but I want to move this over to another class:


public double RadioValue
{
    get
    {
        if (radioOne.Checked) return 1.56;
        if (radioTwo.Checked) return 4.1;
        if (radioThree.Checked) return 4.2;
        return 0;
     }
}

Answers (2)