Raise Base Class Events in Derived Classes C#

后端 未结 3 984
情深已故
情深已故 2021-02-15 07:52

I have a base class DockedToolWindow : Form, and many classes that derive from DockedToolWindow. I have a container class that holds and assigns events to DockedToolWindow objec

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-15 08:33

    You cannot directly fire base class events. This is exactly the reason why you had to make your OnShapeChanged method protected instead of private.

    Use base.OnMove() instead.

提交回复
热议问题