I am in the process of unifying these inconsistent naming conventions and this one problem has been a bit driving me crazy lately.
In the code base I am working with has no convention regarding "ID"; "ID", "Id" and even "iD" are used inconsistently.
****Question**: In .NET, how do you guys capitalize "ID"? For an example, nodeID, nodeId? FolderID or FolderId?
****Edit**: How about plural cases? then should I do "NodeIDs" or "NodeIds"?
Thanks
In English, both letters should be capitalized ("ID"). The lower case word "id" has a specific meaning that does not invoke the meaning "identifier," or "identification." In documentation it should be spelled out (ID abbreviates two different words, after all), or be in all caps.
DO capitalize both characters on two-character acronyms, except the first word of a camel-cased identifier. DO capitalize only the first character of acronyms with three or more characters, except the first word of a camel-cased identifier.
Pascal case -- or PascalCase -- is a programming naming convention where the first letter of each compound word in a variable is capitalized. The use of descriptive variable names is a software development best practice.
Capitalization is for 2 letters acronyms. UI, IP, etc.
"Id" is an abbreviation for Identifier, so it should stay pascal cased.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With