这可能在VB.net中吗?
解决方法imports System.Runtime.CompilerServices... Private propchanged As PropertyChangedEventHandler Public Custom Event PropertyChanged As PropertyChangedEventHandler <MethodImpl(MethodImplOptions.Synchronized)> _ AddHandler(ByVal value As PropertyChangedEventHandler) propchanged = DirectCast([Delegate].Combine(propchanged,value),PropertyChangedEventHandler) End AddHandler <MethodImpl(MethodImplOptions.Synchronized)> _ RemoveHandler(ByVal value As PropertyChangedEventHandler) propchanged = DirectCast([Delegate].Remove(propchanged,PropertyChangedEventHandler) End RemoveHandler RaiseEvent(ByVal sender As Object,ByVal e As System.ComponentModel.PropertyChangedEventArgs) Dim handler = propchanged If handler IsNot @R_301_4910@ Then handler(sender,e) End RaiseEvent End Event总结
以上是内存溢出为你收集整理的在VB.net中显式添加/删除事件全部内容,希望文章能够帮你解决在VB.net中显式添加/删除事件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)