首页 | 本学科首页   官方微博 | 高级检索  
     检索      

小议面向对象编程中的委托类型
引用本文:胡万福.小议面向对象编程中的委托类型[J].芜湖职业技术学院学报,2007,9(4):16-18.
作者姓名:胡万福
作者单位:芜湖职业技术学院,安徽,芜湖,241001
摘    要:委托是C#引入的一种新的数据类型,它是能够引用方法的对象。因此创建委托时,创建的是能够存储方法的引用的对象,一旦委托引用一个方法,就能够调用它引用的方法。在程序运行时,同一个委托能够用来调用不同方法,只要改变它引用的方法即可。因此委托调用的方法不是在编译时决定的,而是在运行时确定。

关 键 词:面向对象  委托  事件
文章编号:1009-1114(2007)04-0016-03
修稿时间:2007年5月9日

Discusses in the Object-oriented Programming Delegation
HU Wan-fu.Discusses in the Object-oriented Programming Delegation[J].Journal of Wuhu Vocational Institute of Technology,2007,9(4):16-18.
Authors:HU Wan-fu
Abstract:Delegation is a new data type which is introduced by C#. It is an object which can quote the method. When we create a delegation, it is indeed create a reference object which can store the method. Once a delegation quotes a method, it can call the method which it cites. When the program is running, if you change a method which is quoted, the same delegation can be used to call different methods. In short, to decide the calling method for the delegation, which is not at the time when the program compiles, but at runtime.
Keywords:C#
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号