在c#中指定radioButton文本名称 [英] Specifying a radioButton text name in c#

查看:288
本文介绍了在c#中指定radioButton文本名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有什么方法可以在c#中指定单选按钮的文本名称,例如:



rd = radioButton1.Text;





Hi guys , Is there any way I can specify the textname of a radio button in c# for example:

rd = radioButton1.Text;


private void button1_Click(object sender, EventArgs e)
        {
if (radioButton1.checked.rd)
{

}





我怎样才能这样做?



How can I go about in doing this?

推荐答案

由于你没有给出正确的信息,我可以帮你仅限于此,

As you have not given proper info, I could help you like this only,
private void button1_Click(object sender, EventArgs e)
{
    if(radBtn.Checked)
    {
        Lbl1.Text = radBtn.Text;
    }
}



-KR


-KR


这篇关于在c#中指定radioButton文本名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆