Understanding events and event handlers in C#

后端 未结 12 1656
野性不改
野性不改 2020-11-22 04:06

I understand the purpose of events, especially within the context of creating user interfaces. I think this is the prototype for creating an event:

public vo         


        
12条回答
  •  死守一世寂寞
    2020-11-22 04:53

    Great technical answers in the post! I have nothing technically to add to that.

    One of the main reasons why new features appear in languages and software in general is marketing or company politics! :-) This must not be under estimated!

    I think this applies to certain extend to delegates and events too! i find them useful and add value to the C# language, but on the other hand the Java language decided not to use them! they decided that whatever you are solving with delegates you can already solve with existing features of the language i.e. interfaces e.g.

    Now around 2001 Microsoft released the .NET framework and the C# language as a competitor solution to Java, so it was good to have NEW FEATURES that Java doesn't have.

提交回复
热议问题