Inheritance and Destructors in C#

后端 未结 7 997
灰色年华
灰色年华 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.

提交回复
热议问题