ModuleBuilder.GetMethodImpl 方法

定義

回傳符合指定條件的模組層級方法。

protected:
 override System::Reflection::MethodInfo ^ GetMethodImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
override this.GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Protected Overrides Function GetMethodImpl (name As String, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo

參數

name
String

方法名稱。

bindingAttr
BindingFlags

一種用來控制搜尋的位元旗標組合 BindingFlags

binder
Binder

一個實作 Binder的物件,包含與此方法相關的屬性。

callConvention
CallingConventions

方法的呼叫慣例。

types
Type[]

方法的參數類型。

modifiers
ParameterModifier[]

一組參數修飾器陣列,用來使綁定能與參數簽名相符,其中類型已被修改。

傳回

一種在模組層級定義並符合指定條件的方法;或者 null 如果沒有這樣的方法。

例外狀況

namenulltypesnull,或是的types一個元素。null

備註

此方法提供 Module.GetMethod 繼承方法所有超載的實作。 使用繼承 Module.GetMethod 的方法取得模組層級已宣告的方法。 模組層級的方法在已發佈程式碼中透過以下 DefineGlobalMethod 方法定義。

Important

模組層級的方法必須在 CreateGlobalFunctions 該方法被為模組呼叫之前才能被檢索。

適用於

另請參閱