C# Class naming convention: Is it BaseClass or ClassBase or AbstractClass -
What is the recommended approach to naming the base class? Is it prefixing the type name with " Base " or " Abstract " or will we just do it with "Base"?
Consider the following:
Type: ViewModel for example main view model , reportwillmodel
base class: baseviewmodel or ViewModelBase or saravyavyalam
Also consider: / P>
Type: Products example VirtualProduct , ExpiringProduct
Base class: BaseProduct or ProductBase or AbstractProduct
What standard do you think?
class unit: EntityBase {} or
class unit: basinity {}
In this example, frameworks with base suffix, such as System.Configuration.Provider.ProviderBase , System.Web.SessionState.SessionStateStoreProviderBase .
But in any way, follow the convention in all basic base class frameworks (like System.Data.Common.DbParameter , System.Data.Common.DbCommand < / Code>).
Personally I will not use suffix Until I want to emphasize the fact that it is an abstract class and has realized that the user name of the class otherwise Can indicate the concrete implementation.
Comments
Post a Comment