.NET命名约定" ID" (任何标识:大小写) [英] .NET naming convention for "ID" (anything identification: Capitalization)
问题描述
我在统一这些不一致的命名约定的过程 而这一问题已经有点让我疯了最近。
I am in the process of unifying these inconsistent naming conventions and this one problem has been a bit driving me crazy lately.
在code碱基我用了关于ID没有约定工作; ID,ID,甚至ID的使用不一致。
In the code base I am working with has no convention regarding "ID"; "ID", "Id" and even "iD" are used inconsistently.
**问:在.NET中,你们如何利用身份证? 举个例子,的nodeID,NODEID? FolderID或FolderId?
**Question: In .NET, how do you guys capitalize "ID"? For an example, nodeID, nodeId? FolderID or FolderId?
**修改:那么多的情况下?那么应该怎么做NodeIDs或NodeIds?
**Edit: How about plural cases? then should I do "NodeIDs" or "NodeIds"?
感谢
推荐答案
资本为2个字母的的缩写。用户界面,IP等。
Capitalization is for 2 letters acronyms. UI, IP, etc.
ID是一个缩写作为标识符,因此它应该保持帕斯卡尔套管。
"Id" is an abbreviation for Identifier, so it should stay pascal cased.
这篇关于.NET命名约定" ID" (任何标识:大小写)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!