Custom Dispose in designed form or user control

前端 未结 4 1719
说谎
说谎 2021-01-05 13:22

I\'ve created a custom WinForms UserControl and would like to override Dispose. However the code generated by the designed already contains a Dispose method. How can I add c

4条回答
  •  一个人的身影
    2021-01-05 13:44

    I just realized that the Dispose method in the x.Designer.cs is outside the 'Component Designer generated code' region. So simply moving the Dispose method to my normal 'code behind' solves my problem.

提交回复
热议问题