So I am declaring a new event for a class and I get to the point where I need to define the event args. All I really need to pass through is a text string.
Now I usually follow some diligent best practice guide that I remember reading awhile ago that says you should define a new class to hold your event args instead of just passing the event data along in the class like so:
Public Event EventName (sender As Object, message As String)
So I do it like so:
Public Class EventNameEventArgs : Inherits EventArgs <br /><br /> Public Property Message() as String <br /><br />End Class <br /><br />Public Event EventName (sender as Object, e As EventNameEventArgs)
The problem is, I have the feeling that I am the only person on the face of the planet doing this :), but I have not seen any code form others that does NOT do this. I just want to get a general consensus for the group here...
I tend to think that yes, it is a good idea because it allows for the addition of new arguments latter on without breaking the existing code that references the event but...
Comments? Flames?
Please, no remarks about VB either...