Winform判断EventHandler是否已经添加
2020-11-19 11:34
标签:winform style class blog code java 斜体部分替换成自己需要的 Winform判断EventHandler是否已经添加,搜素材,soscw.com Winform判断EventHandler是否已经添加 标签:winform style class blog code java 原文地址:http://www.cnblogs.com/eshizhan/p/3706120.html private bool HasValueChangedEventHandler(DateTimePicker b)
{
FieldInfo f1 = typeof(DateTimePicker).GetField("onValueChanged", BindingFlags.Instance | BindingFlags.NonPublic);
var handler = (EventHandler)f1.GetValue(b);
return handler != null;
}