TypeBuilder.DefineMethodCore メソッド

定義

派生クラスでオーバーライドされた場合、指定した名前、メソッド属性、呼び出し規約、メソッド シグネチャ、およびカスタム修飾子を使用して、新しいメソッドを 型に追加します。

protected:
 abstract System::Reflection::Emit::MethodBuilder ^ DefineMethodCore(System::String ^ name, System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ returnTypeRequiredCustomModifiers, cli::array <Type ^> ^ returnTypeOptionalCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ parameterTypeRequiredCustomModifiers, cli::array <cli::array <Type ^> ^> ^ parameterTypeOptionalCustomModifiers);
protected abstract System.Reflection.Emit.MethodBuilder DefineMethodCore (string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? returnTypeRequiredCustomModifiers, Type[]? returnTypeOptionalCustomModifiers, Type[]? parameterTypes, Type[][]? parameterTypeRequiredCustomModifiers, Type[][]? parameterTypeOptionalCustomModifiers);
abstract member DefineMethodCore : string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.MethodBuilder
Protected MustOverride Function DefineMethodCore (name As String, attributes As MethodAttributes, callingConvention As CallingConventions, returnType As Type, returnTypeRequiredCustomModifiers As Type(), returnTypeOptionalCustomModifiers As Type(), parameterTypes As Type(), parameterTypeRequiredCustomModifiers As Type()(), parameterTypeOptionalCustomModifiers As Type()()) As MethodBuilder

パラメーター

name
String

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

attributes
MethodAttributes

メソッドの属性を指定する列挙値のビットごとの組み合わせ。

callingConvention
CallingConventions

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

returnType
Type

メソッドの戻り値の型。

returnTypeRequiredCustomModifiers
Type[]

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

returnTypeOptionalCustomModifiers
Type[]

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

parameterTypes
Type[]

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

parameterTypeRequiredCustomModifiers
Type[][]

型の配列の配列。 型の各配列は、対応するパラメーターに必要なカスタム修飾子を表します。

parameterTypeOptionalCustomModifiers
Type[][]

型の配列の配列。 型の各配列は、対応するパラメーターのオプションのカスタム修飾子を表します。

戻り値

新しく追加されたメソッドを表す MethodBuilder オブジェクト。

適用対象