Quantcast
Channel: Using Delegates AND Declaring Events - Stack Overflow
Browsing all 4 articles
Browse latest View live

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 Article



Answer 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 Article

Answer 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 Article

Using 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
Browsing all 4 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>