Interface / Abstract Class Coding Standard

后端 未结 5 794
礼貌的吻别
礼貌的吻别 2021-02-09 06:01

I spotted a proposed C# coding-standard which stated \"Try to offer an interface with all abstract classes\". Does someone know the rationale for this?

5条回答
  •  我寻月下人不归
    2021-02-09 06:09

    I think it's premature to say whether an interface is needed or not in a general sense. So, I think we should not put "Try to offer an interface with all abstract classes" as a coding standard unless that coding standard includes more details on when this rule applies.

    If I am not going to use the interface at all, am I still required to define an interface just to fulfill the coding standard?

提交回复
热议问题