What are the most common naming conventions in C#?

后端 未结 6 526
我寻月下人不归
我寻月下人不归 2021-01-06 22:52

What are the most common naming conventions in C# for classes, namespaces and methods? Is it common to have getter/setter style methods as in Java?

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-06 23:34

    No it is not common to use getter /setter style names in C#. Properties should be used for almost all places you would use a getter / setter in Java.

    IMHO, the defacto standard for naming conventions comes from the Framework Design Guidelines. It's enforced by several tools (FxCop) and is the dominant style of many libraries including the BCL.

    • http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756

提交回复
热议问题