ModuleBuilder.DefineGlobalMethodCore 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在派生类中重写时,定义具有指定名称、属性、调用约定、返回类型、返回类型的自定义修饰符、参数类型和参数类型的自定义修饰符的全局方法。
protected:
abstract System::Reflection::Emit::MethodBuilder ^ DefineGlobalMethodCore(System::String ^ name, System::Reflection::MethodAttributes attributes, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
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);
abstract member DefineGlobalMethodCore : string * System.Reflection.MethodAttributes * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.MethodBuilder
Protected MustOverride Function DefineGlobalMethodCore (name As String, attributes As MethodAttributes, callingConvention As CallingConventions, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As MethodBuilder
参数
- name
- String
方法的名称。
name 不能包含嵌入 null 字符。
- attributes
- MethodAttributes
指定方法属性的枚举值的按位组合。 属性必须包括 Static。
- callingConvention
- CallingConventions
方法的调用约定。
- returnType
- Type
方法的返回类型。
- requiredReturnTypeCustomModifiers
- Type[]
表示返回类型的所需自定义修饰符的类型数组。
- optionalReturnTypeCustomModifiers
- Type[]
表示返回类型的可选自定义修饰符的类型数组。
- parameterTypes
- Type[]
方法参数的类型。
- requiredParameterTypeCustomModifiers
- Type[][]
类型的数组数组。 每种类型数组都表示全局方法的相应参数所需的自定义修饰符。
- optionalParameterTypeCustomModifiers
- Type[][]
类型的数组数组。 每种类型数组都表示全局方法的相应参数的可选自定义修饰符。
返回
定义的全局方法。