ModuleBuilder.GetMethods(BindingFlags) 方法

定義

傳回為目前 ModuleBuilder 在模組層級上已定義而且符合指定之繫結旗標的所有方法。

C#
public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingFlags);

參數

bindingFlags
BindingFlags

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

傳回

陣列,包含符合 bindingFlags 的所有模組層級方法。

備註

模組層級方法是在發出的程式代碼 DefineGlobalMethod 中使用 方法來定義。

重要

在呼叫模組的方法之後, CreateGlobalFunctions 才能擷取模組層級的方法。

適用於

產品 版本
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)