Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Boy, your english is a mess.
Coding conventions are usually pretty specific per language, but I think it's pretty common in enterprisey .NET type languages to use PascalCasing for field names. Other languages commonly also use camelCasing. It's a bit hard here to tell exactly what you're asking. -
TobiSGD2816yYou don't tell us the language. In Go, for example, everything that is public (or, as it is called in Go: exported) has to start with a capital letter. In Python, though not enforced through the interpreter/compiler, it is common to have private stuff begin with an underscore.
In languages where private/public is handled otherwise it is up to the design guide of your company, and if your company tells you that they want to have public variables starting with a lowercase letter than so be it, there is nothing inherently wrong with that. Just tell your IDE to not capitalize public variables. -
Taking a look at your bio, you are almost certainly talking about C#.
You can have a look at the style guide to see what you're "supposed" to do.
In c#, most member data (Function and variable) is in PascalCase rather than camelCase, and only local variables are really camelCase.
This is unusual and really only applies to C# in my experience.
Most other languages encourage camelCase for all member data, and languages like c just don't have a fucking universal style. -
@HollowKitty I'm french. So yes my english might be a bit weird.
I'm doing my best...
I'm talking about VARIABLES.
Their is a law that say you have to put a _ before the variable name if it's an private variable and the public variables should have a lower case for the first letter of the variable.
My IDE was putting a Upper Case, CAPS for my first letter of my piblic variables and not lower case. So someone told me that it's wrong it have to be lower case but i don't know if he is true.
Is it lower case or Upper case, is their a law about this?
I don't know what do you not understand... All look correct. -
@AlgoRythm Alright that's the answer i was searching for. Ok so i've to change it to lowercase..
I don't know why but Jetbrains Rider was putting PascalCase for public variables.
Sorry for my english again and yes the labguage i was talking for is C#.
Thanks -
@irene Wow you you say the inverse. I'm so confused lol.
Is it a preference, a choice or it's a coding style that we have to follow.
It's look like a preference because some people tell us to use camelCase..
Do you put Caps to public variable ?
My IDE was doing caps to public variable but someone told me that he was wrong it's not caps for public variable only functions.
question
ide
variables
notation
rules