Recommendation 138: Event and delegate variables are named using verb or adjective phrases
Events and delegate usage scenarios call a method, except that the method is assigned by the caller. This determines that the corresponding variable should be named with a verb or an adjective phrase.
Examples of proper naming of events and delegate variables are:
Public Event Routedeventhandler Click; Public Event Sizechangedeventhandler SizeChanged;
These two examples are the button types in WPF, which are not actually occurrences as fields of type, but instead appear as event accessors:
Public Event Routedeventhandler Click { add { } remove { } } publicevent Sizechangedeventhandler SizeChanged { add { } remove { } }
Readers who are familiar with the property can see the event accessor as a method, so it proves from another aspect that events and delegate variables should be named by verbs or adjective phrases.
In addition to event accessors, we can also process delegates and events into fields, and the naming conventions remain the same.
Improper Practice:
Public Event Sizechangedeventhandler Sizechangedeventhandler { add { } remove { } }
We do not recommend this. Because of the particularity of events and delegates, we can not tell whether Sizechangedeventhandler is a delegate type or a delegate variable after naming it.
Turn from: 157 recommendations for writing high-quality code to improve C # programs Minjia
"Go" writing high-quality Code 157 recommendations for improving C # programs--Recommendation 138: Events and delegate variables named with verbs or adjective phrases