這就是我正在做的事情,它會導致堆棧溢出,因爲它只是永遠地來回切換。在WinForms中切換單選按鈕
private void radioButtonA_CheckedChanged(object sender, EventArgs e)
{
radioButtonB.Checked = !radioButtonB.Checked;
}
private void radioButtonB_CheckedChanged(object sender, EventArgs e)
{
radioButtonA.Checked = !radioButtonA.Checked;
}
必須有更好的方法來做到這一點...
哇,這很容易,謝謝! – sooprise 2011-01-05 17:05:02