The following example shows an event delegate declaration.
以下范例所示为事件委派的宣告。
A delegate declaration is sufficient to define a delegate class.
一个委托声明足以定义一个委托类。
The method that you pass as a delegate parameter must have the same signature as the delegate declaration.
作为委托参数传递的方法必须与委托声明具有相同的签名。
With anonymous methods mimic the code layout of a regular method, aligned with the anonymous delegate declaration.
匿名方法模仿普通方法的布局,和匿名委托定义放在一行。
A delegate declaration defines a reference type that can be used to encapsulate a method with a specific signature.
委托是一个定义签名的类型,即方法的返回值类型和参数列表类型。
With anonymous methods, mimic the code layout of a regular method, aligned with the delegate declaration. (complies with placing an open curly brace in a new line).
使用匿名方法时,代码风格应该和普通方法一样,与委托声明对齐。(大括号应该放到新的一行里)。
By default, the backing-store field for an event declaration is a multicast delegate that serially combines all the event handlers.
默认情况下,事件声明的后备存储字段是一个依次组合所有事件处理程序的多路广播委托。
Position the cursor in the method declaration or delegate name and invoke Remove Parameters.
请将光标置于方法声明或委托名称中,然后调用“移除参数”。
The declaration supplies the signature of the delegate, and the common language runtime provides the implementation.
声明提供委托的签名,公共语言运行时提供实现。
The following code example demonstrates the declaration of an event handler delegate that does not use event data.
以下程序码范例示范如何宣告不使用事件资料的事件处理常式委派。
The declaration of a delegate type is similar to a method signature.
委派型别的宣告与方法签章类似。
The declaration of a delegate type is similar to a method signature.
委派型别的宣告与方法签章类似。
应用推荐