Name Conventions
-
Hello, When i should to name method with uppercase letter and when not? When I should use getValue() and when GetValue()? Thanks.
Use getValue() in Java and GetValue() in .NET
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
Use getValue() in Java and GetValue() in .NET
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
Hello, When i should to name method with uppercase letter and when not? When I should use getValue() and when GetValue()? Thanks.
I would use uppercase for a public method, and lower for a private/protected one.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
I would use uppercase for a public method, and lower for a private/protected one.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
I typically use an prefixed underscore to indicate private/protected members :) Not that anyone would care :P
I finally got a job doing something I enjoy and I"m good at...15 hour days seem like play time :P
-
Use getValue() in Java and GetValue() in .NET
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
Colin Angus Mackay wrote:
Use getValue() in Java and GetValue() in .NET
I second that :-D
-
Hello, When i should to name method with uppercase letter and when not? When I should use getValue() and when GetValue()? Thanks.
Most important: Whatever you use, use it consistently. Second most important: What does your companies coding style guidelines say? Third most: Many platforms are associated with a "default style". - see Colins post
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers!
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify!|Fold With Us! -
Hello, When i should to name method with uppercase letter and when not? When I should use getValue() and when GetValue()? Thanks.
camelCase for members, variables, and parameters. PascalCase for methods, Events, and Properties. Of course we all know that Java style is far superior I don't know why the folks at MS tried to dictate a different style.
File Not Found
-
I typically use an prefixed underscore to indicate private/protected members :) Not that anyone would care :P
I finally got a job doing something I enjoy and I"m good at...15 hour days seem like play time :P
I thought we were talking about methods. For variables and properties, I do the same. upper/lower case differences are not enough to be CLS compiant, because VB sucks.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
camelCase for members, variables, and parameters. PascalCase for methods, Events, and Properties. Of course we all know that Java style is far superior I don't know why the folks at MS tried to dictate a different style.
File Not Found
Ennis Ray Lynch, Jr. wrote:
I don't know why the folks at MS tried to dictate a different style.
Because Not Invented Here is alive and rampant at Microsoft. They just, a priori, know what's right.
The evolution of the human genome is too important to be left to chance idiots like CSS.
-
Hello, When i should to name method with uppercase letter and when not? When I should use getValue() and when GetValue()? Thanks.
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
I thought we were talking about methods. For variables and properties, I do the same. upper/lower case differences are not enough to be CLS compiant, because VB sucks.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
Christian Graus wrote:
CLS compiant, because VB sucks.
Wrong, it is because CLS==language independence, a feature it boasts off over Java bytecode. BTW, it is your perfect C# compiler that will complain. If you write and consume your components only in C#, just remove the CLS compliant attribute, and stop blaming VB for your bugs ;P With love, Paul.
Jesus Christ is LOVE! Please tell somebody.
-
I typically use an prefixed underscore to indicate private/protected members :) Not that anyone would care :P
I finally got a job doing something I enjoy and I"m good at...15 hour days seem like play time :P
Hockey wrote:
I typically use an prefixed underscore
Code-Frog:So if this is Pumpkinhead. Time for him to run and hide. It's an interesting thought really.
-
Use getValue() in Java and GetValue() in .NET
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
How about in VB ? ;P
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core "Press any key to continue, where's the ANY key ?" - Homer Simpsons Drinking gives me amazing powers of insight. I can solve all the worlds problems when drunk, but can never remember the solutions in the morning. - Michael P Butler to Paul Watson on 12/08/03
-
How about in VB ? ;P
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core "Press any key to continue, where's the ANY key ?" - Homer Simpsons Drinking gives me amazing powers of insight. I can solve all the worlds problems when drunk, but can never remember the solutions in the morning. - Michael P Butler to Paul Watson on 12/08/03
Use GetValue() in VB - ....although if you are a proper VB programmer you'll probably be a bit more explicit about what the
Value
is...'--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd
-
Use getValue() in Java and GetValue() in .NET
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
Hockey wrote:
I typically use an prefixed underscore
Code-Frog:So if this is Pumpkinhead. Time for him to run and hide. It's an interesting thought really.
I think that applies to public members/fields only.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
-
Christian Graus wrote:
CLS compiant, because VB sucks.
Wrong, it is because CLS==language independence, a feature it boasts off over Java bytecode. BTW, it is your perfect C# compiler that will complain. If you write and consume your components only in C#, just remove the CLS compliant attribute, and stop blaming VB for your bugs ;P With love, Paul.
Jesus Christ is LOVE! Please tell somebody.
Paul Selormey wrote:
Wrong, it is because CLS==language independence, a feature it boasts off over Java bytecode.
True -and to make it language independant, they needed to make it case insensitive. Which languages are case insensitive ?
Paul Selormey wrote:
BTW, it is your perfect C# compiler that will complain.
Of course it will. The VB.NET compiler is too stupid to see a difference between var, Var and VAR to start with.
Paul Selormey wrote:
just remove the CLS compliant attribute,
I've been known to do that, actually
Paul Selormey wrote:
and stop blaming VB for your bugs
ROTFL - you're obviously kidding around, but either way, I think a language being case insensitive is just plain dumb. It's obviously a 'feature' added to VB.NET to make it easier, it's not something that has a real advantage beyond that.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
Hockey wrote:
I typically use an prefixed underscore
Code-Frog:So if this is Pumpkinhead. Time for him to run and hide. It's an interesting thought really.
However, an underscore in any other position in an element name is CLS-compliant.
So it only matters for public properties/methods which I don't think they do. Just for fields like I do.
-
However, an underscore in any other position in an element name is CLS-compliant.
So it only matters for public properties/methods which I don't think they do. Just for fields like I do.
Steve Hansen wrote:
However, an underscore in any other position in an element name is CLS-compliant.
I understood this as
_element
is invalid, butelement_
,my_element
etc are OK.Steve Hansen wrote:
So it only matters for public properties/methods which I don't think they do.
Agreed.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus