Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event naming convention confusion
Message
From
20/06/2007 13:16:42
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Event naming convention confusion
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01234534
Message ID:
01234534
Views:
44
I find it important to stick to a reasonable naming convention and try to do this with my code. I am using a what I thought was consistent with Microsoft regarding events such as

// the event
public event CustomerChangedDelegate CustomerChanged

// Event args
public class CustomerChangedEventArgs : EventArgs

// the method that raises the event (In the publisher)
public void OnCustomerChanged()

// The method for the handler (at the subscriber)
public void CustomerChangedHandler()

Why then with every book I look at are these same names being used but differently such as
public void OnCustomerChanged() used as the handler method at the subscriber. or
public event CustomerChanged OnCustomerChanged when creating the event

This is terribly confusing. Am I on the wrong track or do so many authors struggle to understand the convention? What are y'all doing with your event nameing?

Tim
Timothy Bryan
Next
Reply
Map
View

Click here to load this message in the networking platform