Should I use eventArgs or e

S

SamSpade

I'm working on something the wizard converted from VB6.

I have some event handlers that use eventArgs and some that use e.

It may be simply that the wizard used eventArgs and the IDE uses e.

I know either will work but I'm wondering if there is a convention I should
follow?

Is there?



Thanks,

Cal
 
C

Cor

No there is not Sam,

The e and eventArg are only words chosen by the ones who did make the wizard
and the IDE. It can be any word.

Maybe they took "eventArg" in the converting, because it was more possible
that it is unique than e in your program. I will for testing mostly use
words as a, b, c, d, and cannot take often with dotnet e.

In samples is the "e" often used, so I would advice you to keep it with
that.

I hope this helps?

Cor
 
H

Herfried K. Wagner [MVP]

* " SamSpade said:
I'm working on something the wizard converted from VB6.

I have some event handlers that use eventArgs and some that use e.

It may be simply that the wizard used eventArgs and the IDE uses e.

I know either will work but I'm wondering if there is a convention I should
follow?

It should be called 'e', not 'eventArgs'.
 
J

Jay B. Harlow [MVP - Outlook]

Cal,
In addition to the other's comments:

The framework is largely rather consistent on using "e", as the Design
Guidelines for Class Library Developers say to use "e".

http://msdn.microsoft.com/library/d.../cpgenref/html/cpconEventNamingGuidelines.asp

http://msdn.microsoft.com/library/d...s/cpgenref/html/cpconEventUsageGuidelines.asp

I normally use "e" for new code. However! for upgraded projects I refactor
(Refactoring http://www.refactoring.com) the parameter names and change
other design elements as time permits.

Hope this helps
Jay
 
S

SamSpade

Thanks, especially for the URL's
They sound like something I like to know about

cal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top