The declaration of a delegate type is similar to a method signature.
委派型别的宣告与方法签章类似。
This constructs a new instance of the delegate type using the constructor MyDelegate (object, IntPtr).
通过使用MyDelegate (object, IntPtr)构造器,就构建了一个委托类型的新实例。
Whenever a new set of argument types or return value type is needed, a new delegate type must be declared.
当需要一组新的引数型别或传回值型别时,必须宣告一个新的传回型别。
You can use the delegate type to declare a variable that can refer to any method with the same signature as the delegate.
可以使用委托类型来声明一个变量,该变量可以引用与委托签名相同的所有方法。
Once we have a delegate type in the metadata and a target function we'd like to call, we must form an instance of the delegate over a target.
在一个元数据中,一旦我们有了一个委托类型和一个我们想要调用的目标函数,我们必须从目标形成一个实例。
Each delegate type describes the number and types of the arguments, and the type of the return value of methods that it can encapsulate.
每一个委派型别说明了引数的数目和引数的型别,和它可以封装之方法的传回值型别。
An event handler, a delegate type, that invokes the exposed method can be added to any event as long as the handler and event signatures match.
只要事件处理程序和事件签名匹配,就可以将调用已公开方法的该事件处理程序(委托类型)添加到任何事件。
There also the compiler ensures that the return value of EndInvoke is the same as the return value of the delegate type (this type is an int in our example).
编译器同时也会确保EndInvoke返回值类型和委托返回类型一致(在我们的例子中,这个类型是int)。
Completes the dynamic method and creates a delegate that can be used to execute it, specifying the delegate type and an object the delegate is bound to.
完成动态方法并创建一个可用于执行该方法的委托,指定委托类型和委托绑定到的对象。
The ExecuteFromPool method accepts a delegate and arguments in addition to the desired type.
ExecuteFromPool方法除了接受所需类型以外,还接受委托和参数。
Type forwarding means reassigning the definition of a class, structure, interface, delegate, or enumeration to an assembly other than the one in which it was originally defined.
“类型转发”是指将类、结构、接口、委托或枚举的定义重新分配到从中进行初始定义的程序集以外的一个程序集。
The design of the Facade is directly related to the Commands to which it will delegate, including the various parameterization options that each type of Command exposes.
Facade的设计与将要指定的Command有直接的关系,包含每种类型的Command所公开的各种参数选项。
The GetData delegate takes an object of type System.Array as an in parameter.
GetData这个委托把System.Array类型的一个对象作为参数。
More challenging is the ability to delegate to people who have never done this type of work before.
更具有挑战性的则是把任务分配给那些从来没有从事过这类任务的人。
Any procedure with matching parameter types and return type may be used to create an instance of this delegate class.
任何具有匹配参数类型和返回类型的过程均可用来创建此委托类的实例。
The delegate name is the name by which we will refer to the type we have created.
委托名是用来指向已创建的这个类型的名称。
Delegate, events and asynchronous delegate which is the special peculiarities in common type system are power and convenient.
语言中的委托、事件及异步委托是通用类型系统所特有的语言特性,它功能强大,使用方便。
You use it to specify the arguments and return type of the delegate.
用于指定该委托的参数类型和返回类型。
You use it to specify the argument and return type of the delegate.
用于指定该委托的参数类型和返回类型。
Type of delegate used to reset console color.
用于设置控制台颜色的委托的类型。
When the MDA is activated, it provides the type name of the delegate.
激活mda之后,mda会提供该委托的类型名称。
A type can be declared contravariant in a generic interface or delegate if it is used only as a type of method arguments and not used as a method return type.
在泛型接口或委托中,如果类型形参仅用作方法返回类型,而不用于方法实参,则可声明为协变的。
Delegate is just another type, so you don't gain anything by putting it inside the interface.
翻译过来大致意思就是:委托只是一种类型,把委托放在接口中你什么也得不到。
A contravariant delegate can be assigned another delegate of the same type, but with a less derived generic type parameter.
可以向逆变委托分配同一类型的其他委托,但需使用派生程度较小的泛型类型参数。
A delegate declaration defines a reference type that can be used to encapsulate a method with a specific signature.
委托是一个定义签名的类型,即方法的返回值类型和参数列表类型。
Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity and the specified behavior on failure to bind.
使用用于指定是否区分大小写的值和针对绑定失败的指定行为,创建指定类型的委托,该委托表示指定类的指定静态方法。
A covariant delegate can be assigned another delegate of the same type, but with a more derived generic type parameter.
可以向协变委托分配同一类型的其他委托,但需使用派生程度较大的泛型类型参数。
The . funcptr property of a delegate will return the function pointer value as a function type.
函数指针和委托可能会合并到一个统一的语法中并且可以互相代替。
The . funcptr property of a delegate will return the function pointer value as a function type.
函数指针和委托可能会合并到一个统一的语法中并且可以互相代替。
应用推荐