on-internet
← Community

C# event handling (compared to Java)

Stack Overflow ·

I am currently having a hardtime understanding and implementing events in C# using delagates. I am used to the Java way of doing things: Define an interface for a listener type which would contain a number of method definitions Define adapter class for that interface to make things easier if I'm not interested in all the events defined in a listener Define Add, Remove and Get[] methods in the class which raises the events Define protected fire methods to do the dirty work of looping through the list of added listeners and calling the correct method This I understand (and like!) - I know I coul

Comments

Sign in or sign up to comment and upvote.

No comments yet.