C# Know how many EventHandlers are set?

后端 未结 3 609
生来不讨喜
生来不讨喜 2021-01-04 06:31

As we all know, we can create an EventHandler and add methods to it N number of times. Like:

   // Declare and EventHandler     
   public event EventHandler         


        
3条回答
  •  孤城傲影
    2021-01-04 07:14

    Delegates are removed by equality, so you're not removing anything from the invocation list because nothing in the invocation list would be null.

提交回复
热议问题