How should I inherit IDisposable?

前端 未结 6 1084
南笙
南笙 2021-02-04 01:31

Class names have been changed to protect the innocent.

If I have an interface named ISomeInterface. I also have classes that inherit the interface, FirstClass

6条回答
  •  独厮守ぢ
    2021-02-04 02:14

    My advice is go to the root and not directly to a concrete class. Point 2 is to the root and you are driven by some sort of contract by FirstClass. If you know that classes must implement some interface then you want to ensure that the interface they sign a contract iwth inherits IDisposable

提交回复
热议问题