Interfaces cannot declare types

前端 未结 4 871
终归单人心
终归单人心 2020-12-15 20:24

I have an abstract class in an API that is used by methods in another assembly. The class has a nested enum defined inside it, a bit like this:

abstract publ         


        
4条回答
  •  情话喂你
    2020-12-15 20:55

    abstract class and interface are different things. abstarct class is abstraction, higher than your domain model and interface is the contract (behavior) of your domain entity. You can use both in your solution as necessary. In concrete scenario status is not behavior it just state of entity. I think abstract class is more reliable choice.

提交回复
热议问题