What is the correct case convention for Set?

  • Thread starter Thread starter **Developer**
  • Start date Start date
D

**Developer**

I looked at MSDN and a book and both described the naming convention for
parameters should be camel style.

The book used camel, except for Set (ByVal Value as ...)

There it always used an uppercase V


What is the correct convention for Set?

Anything special if the name is Value.


Thanks
 
**Developer** said:
I looked at MSDN and a book and both described the naming convention for
parameters should be camel style.

The book used camel, except for Set (ByVal Value as ...)

There it always used an uppercase V


What is the correct convention for Set?

There is no correct naming. It simply depends on which naming convention
you are following. If you are using the .NET Framework's naming convention,
the parameter should be named 'Value' (camel case for method parameters).
In VB 2005 the parameter is named 'value' opposed to 'Value' in VS.NET
2002/2003 (unfortunately, because I use my own convention...).
 
I should have written: "correct by the .NET Framework's naming "convention
rather then: "correct convention"

you said:
"If you are using the .NET Framework's naming convention,
the parameter should be named 'Value' (camel case for method parameters)."


Anyway, my confusion must stem from the definition of camel
I believe "newColorValue" is camel.
Shouldn't it be "value" or is one word capitalized?


Thanks again
 
**Developer** said:
Anyway, my confusion must stem from the definition of camel
I believe "newColorValue" is camel.

Yes, that's camel case.
Shouldn't it be "value" or is one word capitalized?

According to the .NET Framework naming guidelines it should read 'value'.
VS 2005 names the parameter 'value' by default.
 
thanks
Herfried K. Wagner said:
Yes, that's camel case.


According to the .NET Framework naming guidelines it should read 'value'.
VS 2005 names the parameter 'value' by default.
 

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

Back
Top