摘要: 委托市一中特殊的对象类型,它定义了方法的类型,使得可以方法当作另一个方法的参数进行传递,其特殊指出在于,我们以前定义的所有对象都包含数据,而委托包含的只是方法的地址,下面是代码:class Program { static void Main(string[] args) { DelegateTest test = new DelegateTest(); // 特别注意:传递的为事件的地址指针 test.Dowork("唐雷", test.sayChinese); test.Dowork("tl", test.sayChinese); ... 阅读全文
posted @ 2011-09-14 15:51 kuangkro 阅读(244) 评论(0) 推荐(0) 编辑
摘要: <body> <script type="text/javascript"> var classa= { A:function(){ alert("this is function a");}, B:function(){ alert("this is function b");} }; classa.A(); classa.B(); var classb=function() { function aa() { alert("this is function aa"); } ... 阅读全文
posted @ 2011-09-14 15:04 kuangkro 阅读(135) 评论(0) 推荐(0) 编辑