.net - character casing for abbreviations in dotnet -


have ever wondered why ms doesn't write abbreviations in upper case? guid, bmpbitmapencoder, system.net.mime, httpwebrequest, xmldocument, etc., instead of guid, bmpbitmapencoder, system.net.mime, httpwebrequest, xmldocument. suspect it's better readability, in opinion, it's worse, , maybe bit incorrect. there ms document explains why decided this? i'm sure it's intentional, here's bonus question, find name in bcl contains upper case abbreviation :)

the rule use two-character acronyms left uppercase: ioexception

while longer acronyms treated words , use initial cap.

from http://msdn.microsoft.com/en-us/library/ms229043.aspx:

the following guidelines specify proper casing short , long acronyms. identifier casing rules take precedence on acronym casing rules.

do capitalize both characters of two-character acronyms, except first word of camel-cased identifier.

a property named dbrate example of short acronym (db) used first word of pascal-cased identifier. parameter named iochannel example of short acronym (io) used first word of camel-cased identifier.

do capitalize first character of acronyms 3 or more characters, except first word of camel-cased identifier.

a class named xmlwriter example of long acronym used first word of pascal-cased identifier. parameter named htmlreader example of long acronym used first word of camel-cased identifier.

do not capitalize of characters of acronyms, whatever length, @ beginning of camel-cased identifier.

a parameter named xmlstream example of long acronym (xml) used first word of camel-cased identifier. parameter named dbservername example of short acronym (db) used first word of camel-cased identifier.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -