elite的技术前沿

数据库,sql server, NOSQL, Redis, Mongodb, Azure

about MSDN's dispose()

Here is a Question about MSDN's dispose() : http://blog.mvpcn.net/cuike519/archive/2004/09/04/3579.aspx

about that dispose() method , I think it' s:

public class SimpleControl: System.Web.UI.Control
{
public override void Dispose()
{
base.Dispose ();
}
}
it has  no error 
but if you derive from  System.ComponentModel.Component ,it has two  Dispose() method
void Dispose()
void Dispose(bool disposing)

ms has approved it's msdn 's error .
only second can be overrided
so right is :

[c#]
public void Dispose();
protected virtual void Dispose(bool disposing);

[vb.net]
Public Sub Dispose()
Protected Overridable Sub Dispose(ByVal disposing As Boolean)

阅读更多
文章标签: vb.net class c#
个人分类: .net
上一篇韦尔奇选人的四个标准
下一篇技术最前沿-Sql server 2017 新特性探究(1)
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭