formradiobutton.cs

来自「csharp课本的源代码」· CS 代码 · 共 27 行

CS
27
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace RadioButtonExam
{
    public partial class FormRadioButton : Form
    {
        private void RB_CheckedChanged(object sender, System.EventArgs e)
        {
            RadioButton check = (RadioButton)sender;
            if (check.Checked)
            {
                textBoxResult.Text = check.Text;
            }
        }

        public FormRadioButton()
        {
            InitializeComponent();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?