1、 毕业设计(论文)外文文献毕业设计(论文)外文文献 原文及译文原文及译文 学 院:计算机科学与工程学院 专 业: 网络工程 班 级: 学生姓名: 指导教师: 原文:原文: Delegate Delegates enable scenarios that other languagessuch as C+, Pascal, and Modulahave addressed with function pointers. Unlike C+ function pointers, however, delegates are fully object oriented, and unlike C+
2、pointers to member functions, delegates encapsulate both an object instance and a method. A delegate declaration defines a class that is derived from the class System.Delegate. A delegate instance encapsulates an invocation list, which is a list of one or more methods, each of which is referred to a
3、s a callable entity. For instance methods, a callable entity consists of an instance and a method on that instance. For static methods, a callable entity consists of just a method. Invoking a delegate instance with an appropriate set of arguments causes each of the delegates callable entities to be
4、invoked with the given set of arguments. An interesting and useful property of a delegate instance is that it does not know or care about the classes of the methods it encapsulates; all that matters is that those methods be compatible with the delegates type. This makes delegates perfectly suited for “anonymous” invocation. 1.1 Delegate declarations A delegate-declaration is a type-declaration that declares a new delegate type. delegate-declaration: attrib