新浪博客

C#winform中判断控件类型

2022-04-11 20:59阅读:
public void UpdataControl(Control control, string data)
{
if (control is TextBox)
{
doSomething1();
}
if (control is Label)
{
doSomething1();
}
if (control is Button)
{
doSomething1();
}
}

我的更多文章

下载客户端阅读体验更佳

APP专享