IExpando.AddMethod(String, Delegate) 方法

定義

將具名方法加入 Reflection 物件。

public:
 System::Reflection::MethodInfo ^ AddMethod(System::String ^ name, Delegate ^ method);
public System.Reflection.MethodInfo AddMethod (string name, Delegate method);
abstract member AddMethod : string * Delegate -> System.Reflection.MethodInfo
Public Function AddMethod (name As String, method As Delegate) As MethodInfo

參數

name
String

方法的名稱。

method
Delegate

方法的委派。

傳回

MethodInfo 物件,表示所加入的方法。

例外狀況

IExpando 物件不支援這個方法。

適用於