C# naming conventions for acronyms

前端 未结 8 2064
耶瑟儿~
耶瑟儿~ 2020-12-04 09:55

Regarding C# naming for acronyms, if I was writing a library related to the Windows API is there any strong convention toward either WindowsApi or WindowsAPI or is it just p

8条回答
  •  [愿得一人]
    2020-12-04 10:17

    I've heard that you should avoid abbreviations, so it would become WindowsApplicationProgrammingInterface, then.

    More seriously (folks seem to be mis-reading the above, despite the quote below), this page says:

    Any acronyms of three or more letters should be Pascal case, not all caps.

    Since API is considered a well-known acronym, the name WindowsApi is the one to pick if you want to follow the guidelines.

提交回复
热议问题