Prevent next event handler being called

后端 未结 6 1209
孤街浪徒
孤街浪徒 2021-01-21 01:35

I have two event handlers wired up to a button click in a Windows form like so:

this.BtnCreate.Click += new System.EventHandler(new RdlcCreator().FirstHandler);
         


        
6条回答
  •  悲&欢浪女
    2021-01-21 02:12

    As far as I know there is no solution for this. That's because there is no guarantee for the order in which the event handlers are called when the event happens.

    Because of that you are not supposed to rely on their order in any way.

提交回复
热议问题