How to implement the Dispose(boolean) at a UserControl… when the VS Designer already implemented it with a DebuggerNonUserCode attribute? Will my modifications on this method removed?
(code from UserControl.Designer.vb)
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
You need to remove the
Disposemethod from the designer file and add it to your source file.You should probably also remove the
DebuggerNonUserCodeattribute.At least in C#, the designer will not automatically put the
Disposeback into the designer file, and I’d be shocked if the VB designer did.