Naming conventions?

A

Allan Ebdrup

Does anyone have some good pointers to good naming conventions preferrably
by MS.

Another developer and I had a discussion on the naming of a public property
that contains a collection of variables.
He wants to call it "Parameter" like when you name tables in SQL, I want to
call it "Parameters" so you can see that it contains several values. What is
the correct naming in OO, and do you have a pointer to a document that
describes these naming conventions?

Kind Regards,
Allan Ebdrup
 
C

Carlos J. Quintero [.NET MVP]

Hi Allan,

In OOP "Parameters" is more suitable than "Parameter" for a property of the
type ArrayList, Collection, etc. The best argument to convince your fellow
is to use the Object Browser and take a look at the Microsoft .NET Framework
libraries. You will notice that while classes are named like
"ListView.ColumnHeaderCollection", the property is named ListView.Columns.
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
M

Michael S

Allan Ebdrup said:
Does anyone have some good pointers to good naming conventions preferrably
by MS.

Another developer and I had a discussion on the naming of a public
property that contains a collection of variables.
He wants to call it "Parameter" like when you name tables in SQL, I want
to call it "Parameters" so you can see that it contains several values.
What is the correct naming in OO, and do you have a pointer to a document
that describes these naming conventions?

Kind Regards,
Allan Ebdrup

There is no question about it. You should use 'Parameters'.
Look at the overall naming convention in .NET framework. Examples:

Request.QueryString.Keys[0];
myDataset.Tables[0].Rows[0];

- Michael S
 
A

Allan Ebdrup

Michael S said:
There is no question about it. You should use 'Parameters'.
Look at the overall naming convention in .NET framework. Examples:

Request.QueryString.Keys[0];
myDataset.Tables[0].Rows[0];

I will precent the evidence and hopefully convince him that "Parameters" is
the correct choice. Thanks for your feedback.
 

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