[ACCEPTED]-Naming conventions: Guidelines for verbs/nouns and english grammar usage-naming-conventions
Look at the MSDN articles for naming guidelines. In short:
- Use nouns for class names and property names (it's obvious)
- For interface names, start with I and use nouns and/or adjectives to describe behavior
- Use verbs for method names to describe action
For 1 your example - IGroupableItem.
Interfaces are things a class is capable 5 of doing. Not what it is, but what it can 4 do.
IGroupableItem
Other names describe what things are or 3 are too vague to be useful.
Specifically, "IDataEntity" is 2 largely meaningless. After all, everything's 1 a data entity.
MSDN has an article just on Interface Naming Guidelines that may help 4 you out. If you want the naming conventions 3 of stuff other than interfaces, along with 2 many other naming and design guidelines, you 1 can find that all on MSDN, too.
This is the same material as Spodi's answer, but 2 MSDN's Design Guidelines for Class Library Developers are mostly excellent, covering naming and 1 much, much more.
There is nice article Making Wrong Code Look Wrong by Joel Spolsky. It 2 tells about not so popular, but very handy 1 naming convention.
As well as the MSDN Guidelines, there is 3 a C# Coding Standards document from IDesign by 2 Juval Lowy that is quite helpful (don't 1 know if/how much this differs from MSDN).
For verbs in function (and etc.) names, it's 3 common to use the original form of the verb, like 2 Handle
, ExecuteQuery
, or IsAny
, ...
Some less common usage of verbs 1 makes it singular with s/es
, like ProducesResponseType
(MS Docs).
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.