摘要:
sealed的中文意思是密封,故名思义,就是由它修饰的类或方法将不能被继承或是重写。 sealed关键字的作用: 在类声明中使用sealed可防止其它类继承此类;在方法声明中使用sealed修饰符可防止扩充类重写此方法。 sealed修饰符主要用于防止非有意的派生,但是它还能促使某些运行时优化。具体说来,由于密封类永远不会有任何派生类,所以对密封类的实例的虚拟函数成员的调用可以转换为非虚拟调用... 阅读全文
posted @ 2010-10-20 16:31
゛.諷ゞ/
阅读(886)
评论(1)
推荐(0)
摘要:
Page对象有一Load事件,应该是如下定义: protected event EventHandler Load; 此事件继承到页面 OnLoad是Page的一个方法,应该是如下定义: protected virtual void OnLoad(EventArgs e) 此方法唤起Load事件,方法内大约包含: if(Load)Load(this,e); 此方法也继承到页面,甚至被重... 阅读全文
posted @ 2010-10-20 16:25
゛.諷ゞ/
阅读(423)
评论(0)
推荐(0)
摘要:
using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using ... 阅读全文
posted @ 2010-10-20 16:24
゛.諷ゞ/
阅读(1428)
评论(0)
推荐(0)

浙公网安备 33010602011771号