且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将 Dispose 功能添加到 C# UserControl?

更新时间:2023-12-06 16:06:28

在这种情况下,我将生成的 Dispose 方法移动到主文件并扩展它.Visual Studio 尊重这一点.

In such a case I move the generated Dispose method to the main file and extend it. Visual Studio respects this.

另一种方法是使用部分方法 (C# 3.0).

An other approach would be using a partial method (C# 3.0).