英語で読む

次の方法で共有


ModuleBuilder.DefineGlobalMethodCore メソッド

定義

派生クラスでオーバーライドされた場合、指定された名前、属性、呼び出し規約、戻り値の型、戻り値の型のカスタム修飾子、パラメーター型、およびパラメーター型のカスタム修飾子を使用してグローバル メソッドを定義します。

C#
protected abstract System.Reflection.Emit.MethodBuilder DefineGlobalMethodCore(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);

パラメーター

name
String

メソッドの名前。 name には、埋め込み文字を null 含めることはできません。

attributes
MethodAttributes

メソッドの属性を指定する列挙値のビットごとの組み合わせ。 属性には を含める Static必要があります。

callingConvention
CallingConventions

メソッドの呼び出し規則。

returnType
Type

メソッドの戻り値の型。

requiredReturnTypeCustomModifiers
Type[]

戻り値の型に必要なカスタム修飾子を表す型の配列。

optionalReturnTypeCustomModifiers
Type[]

戻り値の型の省略可能なカスタム修飾子を表す型の配列。

parameterTypes
Type[]

メソッドのパラメーター型。

requiredParameterTypeCustomModifiers
Type[][]

型の配列の配列。 型の各配列は、グローバル メソッドの対応するパラメーターの必須のカスタム修飾子を表します。

optionalParameterTypeCustomModifiers
Type[][]

型の配列の配列。 型の各配列は、グローバル メソッドの対応するパラメーターの省略可能なカスタム修飾子を表します。

戻り値

定義されたグローバル メソッド。

適用対象

製品 バージョン
.NET 8, 9, 10