MulticastDelegate 构造函数

定义

初始化 MulticastDelegate 类的新实例。

重载

名称 说明
MulticastDelegate(Object, String)

初始化 MulticastDelegate 类的新实例。

MulticastDelegate(Type, String)

初始化 MulticastDelegate 类的新实例。

MulticastDelegate(Object, String)

初始化 MulticastDelegate 类的新实例。

protected:
 MulticastDelegate(System::Object ^ target, System::String ^ method);
protected MulticastDelegate(object target, string method);
new MulticastDelegate : obj * string -> MulticastDelegate
Protected Sub New (target As Object, method As String)

参数

target
Object

在其中定义的对象 method

method
String

为其创建委托的方法的名称。

例外

无法创建抽象类的实例,或者此成员是使用后期绑定机制调用的。

注解

此构造函数不能用于应用程序代码。 若要通过指定实例方法的名称来创建委托,请使用指定方法名称和目标对象的方法重载 Delegate.CreateDelegate 。 例如, Delegate.CreateDelegate(Type, Object, String) 方法重载为具有指定名称的实例方法创建委托。

适用于

MulticastDelegate(Type, String)

初始化 MulticastDelegate 类的新实例。

protected:
 MulticastDelegate(Type ^ target, System::String ^ method);
protected MulticastDelegate(Type target, string method);
new MulticastDelegate : Type * string -> MulticastDelegate
Protected Sub New (target As Type, method As String)

参数

target
Type

所定义对象的 method 类型。

method
String

为其创建委托的静态方法的名称。

例外

无法创建抽象类的实例,或者此成员是使用后期绑定机制调用的。

注解

此构造函数不能用于应用程序代码。 若要通过指定静态方法的名称来创建委托,请使用指定方法名称但未指定目标对象的方法重载 Delegate.CreateDelegate 。 例如, Delegate.CreateDelegate(Type, Type, String) 方法重载为具有指定名称的方法创建静态委托。

适用于