有关委托的应用,请参见委托和泛型委托。
For applications of delegates, see delegates and Generic delegates.
在对象应发布服务实例时回调的泛型委托。
A generic delegate that is called back when an object should publish an instance of a service.
可以向逆变委托分配同一类型的其他委托,但需使用派生程度较小的泛型类型参数。
A contravariant delegate can be assigned another delegate of the same type, but with a less derived generic type parameter.
在泛型接口或委托中,如果类型形参仅用作方法返回类型,而不用于方法实参,则可声明为协变的。
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.
在泛型类中定义的委托,可以与类的方法一样地使用泛型类的类型参数。
Specialized generic types are created once for each unique value type used as a parameter.
如果使用的是泛型版本,则不需要自定义委托。
If you are using the generic version, you do not need a custom delegate.
可以向协变委托分配同一类型的其他委托,但需使用派生程度较大的泛型类型参数。
A covariant delegate can be assigned another delegate of the same type, but with a more derived generic type parameter.
可以向协变委托分配同一类型的其他委托,但需使用派生程度较大的泛型类型参数。
A covariant delegate can be assigned another delegate of the same type, but with a more derived generic type parameter.
应用推荐