摘要: delegate and event are closely connected in C#. With delegate alone, the type declared by delegate works just as the function pointer in C/C++. Thus we may see codes like this://declare delegate typep... 阅读全文
posted @ 2006-08-01 16:50 xiaoyixy 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 首先是abstract类的abstract method必须得override,如abstract class Template{ public Template(string msg) { Console.WriteLine(msg); } public void printNormal() { Console.WriteLine("No... 阅读全文
posted @ 2006-08-01 10:29 xiaoyixy 阅读(280) 评论(1) 推荐(0) 编辑
摘要: 通常情况下,base class定义一个virtual method,在derived class中override虚函数,将使新的类中的同名函数定义为自己的函数. 但如果想在继承的中途改变基类的虚函数,可以在derivedC2用如public new virtual void...(new关键字)进行定义同名函数,则后面由此类继续的类中,覆写同名函数的基虚函数为更新后的. 而... 阅读全文
posted @ 2006-08-01 10:14 xiaoyixy 阅读(663) 评论(0) 推荐(0) 编辑