在用户控件实现Dispose(布尔)布尔、控件、用户、Dispose

由网友(拔了角的鹿)分享简介:如何在用户控件执行的Dispose(布尔)......当VS设计已经实现了它与 DebuggerNonUser code 属性?请问我的修改,这种方法去除?($ C $从UserControl.Designer.vb C)< System.Diagnostics.DebuggerNonUser code()&GT...

如何在用户控件执行的Dispose(布尔)......当VS设计已经实现了它与 DebuggerNonUser code 属性?请问我的修改,这种方法去除?

($ C $从UserControl.Designer.vb C)

 < System.Diagnostics.DebuggerNonUser code()> _
受保护的覆盖子的Dispose(BYVAL处置作为布尔)
 

解决方案

您需要从设计器文件中删除处置方法,并将其添加到您的源文件。< BR> 你或许应该也删除 DebuggerNonUser code 属性。

至少在C#中,设计师将不会自动把处置返回到设计文件,如果VB的设计师做了我会感到震惊。

刚下载了labview2010软件,啥都不懂,想问一下高手,我在控件里找不到公式控件,该怎么办

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 Dispose method from the designer file and add it to your source file. You should probably also remove the DebuggerNonUserCode attribute.

At least in C#, the designer will not automatically put the Dispose back into the designer file, and I'd be shocked if the VB designer did.

阅读全文

相关推荐

最新文章