C# Class naming convention: Is it BaseClass or ClassBase or AbstractClass

前端 未结 8 1143
时光取名叫无心
时光取名叫无心 2020-12-07 14:22

What is the recommended approach to naming base classes? Is it prefixing the type name with \"Base\" or \"Abstract\" or would we just suffi

8条回答
  •  没有蜡笔的小新
    2020-12-07 15:04

    Always think about alphabetizing when you name stuff. I really don't like looking at a SQL server and every stored procedure is named usp[something]. Along the same lines, don't overuse Get and Set as leading names for a function. Instead of GetItems or PlaceOrder, think about naming them as ItemsGet or OrderPlace.

    So, in general, ClassnameBase / EntityBase would be a better choice.

提交回复
热议问题