MulticastDelegate 建構函式

定義

初始化 MulticastDelegate 類別的新執行個體。

多載

MulticastDelegate(Object, String)

初始化 MulticastDelegate 類別的新執行個體。

MulticastDelegate(Type, String)

初始化 MulticastDelegate 類別的新執行個體。

MulticastDelegate(Object, String)

來源:
MulticastDelegate.cs
來源:
MulticastDelegate.cs
來源:
MulticastDelegate.cs

初始化 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.cs
來源:
MulticastDelegate.cs
來源:
MulticastDelegate.cs

初始化 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

建立委派的靜態 (Static) 方法名稱。

例外狀況

無法建立抽象類別的執行個體,或者這個成員曾被晚期繫結機制叫用過。

備註

此建構函式不能用於應用程式程式碼中。 若要藉由指定靜態方法的名稱來建立委派,請使用指定方法名稱但未指定目標物件的方法多載 Delegate.CreateDelegate 。 例如, Delegate.CreateDelegate(Type, Type, String) 方法多載會為具有指定名稱的方法建立靜態委派。

適用於