Answer by Aaron Daniels for Using Delegates AND Declaring Events
You can get rid of the delegate by using a generic EventHandler. All you have to do is create your own class that inherits from EventArgs.Public Class Foo Inherits EventArgsEnd ClassPublic Class Bar...
View ArticleAnswer by Reed Copsey for Using Delegates AND Declaring Events
I would say just completely remove your delegate entirely.Your delegate is doing exactly the same thing as the event. You are pretty much writing your own event plumbing instead of using the...
View ArticleAnswer by irperez for Using Delegates AND Declaring Events
For your class library all you need is to write the public Event line of code. Public Event TimerElapsed(ByVal sender As Object, ByVal e As System.EventArgs)Make sure to raise the event anywhere in...
View ArticleUsing Delegates AND Declaring Events
I'm developing a class library to be used for other developers and will be allowing them to either declare an instance of my class using WithEvents (or similar in other languages) as well as allow them...
View Article
More Pages to Explore .....