Click here to Skip to main content
15,915,324 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: CLR Addin plugins compatibility Pin
Scott Dorman17-Sep-08 4:44
professionalScott Dorman17-Sep-08 4:44 
Questionasp.net mouse move coordinate change Pin
Vaibhav Saran16-Sep-08 22:03
Vaibhav Saran16-Sep-08 22:03 
GeneralRe: asp.net mouse move coordinate change Pin
Pete O'Hanlon16-Sep-08 22:46
mvePete O'Hanlon16-Sep-08 22:46 
GeneralRe: asp.net mouse move coordinate change Pin
Vaibhav Saran16-Sep-08 23:21
Vaibhav Saran16-Sep-08 23:21 
GeneralRe: asp.net mouse move coordinate change Pin
Pete O'Hanlon17-Sep-08 1:01
mvePete O'Hanlon17-Sep-08 1:01 
GeneralRe: asp.net mouse move coordinate change Pin
N a v a n e e t h17-Sep-08 5:45
N a v a n e e t h17-Sep-08 5:45 
GeneralRe: asp.net mouse move coordinate change Pin
Pete O'Hanlon17-Sep-08 8:14
mvePete O'Hanlon17-Sep-08 8:14 
QuestionEventArgs question... Pin
Ray Cassick16-Sep-08 5:09
Ray Cassick16-Sep-08 5:09 
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 

   Public Property Message() as String 

End Class 

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 Smile | :) , 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...


AnswerRe: EventArgs question... Pin
Colin Angus Mackay16-Sep-08 5:37
Colin Angus Mackay16-Sep-08 5:37 
AnswerRe: EventArgs question... Pin
srabik16-Sep-08 5:41
srabik16-Sep-08 5:41 
AnswerRe: EventArgs question... Pin
Dave Kreskowiak16-Sep-08 5:49
mveDave Kreskowiak16-Sep-08 5:49 
GeneralRe: EventArgs question... Pin
Ray Cassick16-Sep-08 6:19
Ray Cassick16-Sep-08 6:19 
AnswerRe: EventArgs question... Pin
Giorgi Dalakishvili16-Sep-08 6:21
mentorGiorgi Dalakishvili16-Sep-08 6:21 
GeneralRe: EventArgs question... Pin
Ray Cassick16-Sep-08 8:09
Ray Cassick16-Sep-08 8:09 
GeneralRe: EventArgs question... Pin
Giorgi Dalakishvili16-Sep-08 8:14
mentorGiorgi Dalakishvili16-Sep-08 8:14 
AnswerRe: EventArgs question... Pin
Scott Dorman17-Sep-08 4:46
professionalScott Dorman17-Sep-08 4:46 
GeneralRe: EventArgs question... Pin
Ray Cassick17-Sep-08 4:53
Ray Cassick17-Sep-08 4:53 
GeneralRe: EventArgs question... Pin
Scott Dorman17-Sep-08 5:13
professionalScott Dorman17-Sep-08 5:13 
AnswerRe: EventArgs question... Pin
PIEBALDconsult25-Sep-08 13:40
mvePIEBALDconsult25-Sep-08 13:40 
QuestionKeywords vs Type Names Pin
Tristan Rhodes16-Sep-08 0:29
Tristan Rhodes16-Sep-08 0:29 
AnswerRe: Keywords vs Type Names Pin
Dave Kreskowiak16-Sep-08 1:59
mveDave Kreskowiak16-Sep-08 1:59 
GeneralRe: Keywords vs Type Names Pin
dojohansen16-Sep-08 3:05
dojohansen16-Sep-08 3:05 
GeneralRe: Keywords vs Type Names Pin
Tristan Rhodes16-Sep-08 6:18
Tristan Rhodes16-Sep-08 6:18 
GeneralRe: Keywords vs Type Names Pin
Paul Conrad16-Sep-08 8:35
professionalPaul Conrad16-Sep-08 8:35 
GeneralRe: Keywords vs Type Names Pin
Robert.C.Cartaino16-Sep-08 4:20
Robert.C.Cartaino16-Sep-08 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.