Inheritance and Destructors in C#

后端 未结 7 976
灰色年华
灰色年华 2021-02-13 19:30

According to this, it states that Destructors cannot be inherited or overloaded. In my case, for all subclasses, the destructors will be identical. Is this pretty m

7条回答
  •  执念已碎
    2021-02-13 19:58

    Well, I don't know about destructors, but you have other useful methods for cleanup like Finalize() and Dispose() from IDisposable.

提交回复
热议问题