这个很好用:
protected void txtTest_Load(object sender, EventArgs e) { if (sender is TextBox) {...} }
有没有办法检查发送者是否不是TextBox,某种等同于!=表示" Is“的东西?
请不要建议将逻辑移到ELSE{} :)
https://stackoverflow.com/questions/529944
相似问题