Radio button checked changed event fires twice

后端 未结 7 1026
梦谈多话
梦谈多话 2020-12-03 16:52

Please read my question its not a duplicate one.

I\'ve three radio buttons on windows form and all these buttons have common \'CheckedChanged\' event associated. Whe

7条回答
  •  余生分开走
    2020-12-03 17:23

    To avoid it, just check if radioButton is checked

    for example:

    private void radioButton1_CheckedChanged(object sender, EventArgs e)
    {
        if (radioButton1.Checked)
            //your code
    }
    

提交回复
热议问题