dotnet 中缩写的字符大小写
您是否想过为什么 MS 不将缩写全部大写?像Guid、BmpBitmapEncoder、System.Net.Mime、HttpWebRequest、XmlDocument等,而不是GUID、BMPBitmapEncoder、System.Net.MIME、HTTPWebRequest、XMLDocument。我怀疑这是为了更好的可读性,但在我看来,这更糟糕,甚至可能有点不正确。 MS 是否有一份文档解释了他们为什么决定这样做?我确信这是故意的,但这里有一个额外的问题,在 BCL 中找到一个包含全大写缩写的名称:)
Have you ever wondered why MS doesn't write abbreviations in all upper case? Like Guid, BmpBitmapEncoder, System.Net.Mime, HttpWebRequest, XmlDocument, etc., instead of GUID, BMPBitmapEncoder, System.Net.MIME, HTTPWebRequest, XMLDocument. I suspect it's for better readability, but in my opinion, it's worse, and maybe even a bit incorrect. Is there an MS document that explains why they decided to do it like this? I'm sure it's intentional, but here's a bonus question, find a name in the BCL which contains an all upper case abbreviation :)
他们使用的规则是两个字符的缩写词保留大写:
IOException
而较长的缩写词被视为单词并使用首字母大写。
来自 http://msdn.microsoft.com/en-us/library/ms229043 .aspx:
The rule they use is that two-character acronyms are left uppercase:
IOException
While longer acronyms are treated as words and use initial cap.
From http://msdn.microsoft.com/en-us/library/ms229043.aspx: