Inheritance and Destructors in C#

后端 未结 7 981
灰色年华
灰色年华 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 20:09

    If you define a destructor for B, it will be called, followed by A's. See the example at the bottom of the link you provided.

    0 讨论(0)
提交回复
热议问题