Why should events in C# take (sender, EventArgs)?

前端 未结 10 1262
轻奢々
轻奢々 2020-12-08 18:46

It\'s known that you should declare events that take as parameters (object sender, EventArgs args). Why?

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 19:28

    It seemed that this was Microsoft's way to evolve the event model over time. It also seems that they are also allowing another way to do it with the "new" Action delegate and it's variations.

提交回复
热议问题