Home All Groups Group Topic Archive Search About

What is the correct case convention for Set?

Author
24 Jan 2006 11:26 PM
**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

Author
25 Jan 2006 12:29 AM
Herfried K. Wagner [MVP]
" **Developer**" <REMOVEdevelo***@a-znet.com> schrieb:
>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...).

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
25 Jan 2006 2:14 PM
**Developer**
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




Show quoteHide quote
>>
>> 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...).
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>
Author
25 Jan 2006 2:32 PM
Herfried K. Wagner [MVP]
" **Developer**" <REMOVEdevelo***@a-znet.com> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
25 Jan 2006 4:38 PM
**Developer**
thanks
Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:eCPugwbIGHA.2628@TK2MSFTNGP15.phx.gbl...
>" **Developer**" <REMOVEdevelo***@a-znet.com> schrieb:
>> 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.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>