.NET naming convention for “ID” (anything identifi

2020-05-15 13:40发布

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

7条回答
2楼-- · 2020-05-15 14:33

I always capitalize ID when it is an abbreviation for identifier, etc. It just looks wrong and makes me think of Freud, otherwise -- which is definitely not a good thing.

查看更多
登录 后发表回答