vs 2008 C# 中,使用object sender,获取控件名称,需要添加哪个using?

2024-12-26 22:21:49
推荐回答(1个)
回答1:

string name = (sender as Button).Name
or
string name = ((Button)sender) .Name