FieldInfo.GetRequiredCustomModifiers 方法


获取一个类型数组,这些类型标识属性所需的自定义修饰符。Gets an array of types that identify the required custom modifiers of the property.

 virtual cli::array <Type ^> ^ GetRequiredCustomModifiers();
public virtual Type[] GetRequiredCustomModifiers ();
abstract member GetRequiredCustomModifiers : unit -> Type[]
override this.GetRequiredCustomModifiers : unit -> Type[]
Public Overridable Function GetRequiredCustomModifiers () As Type()



Type 对象的数组,这些对象标识当前属性所必需的自定义修饰符(例如 IsConstIsImplicitlyDereferenced)。An array of Type objects that identify the required custom modifiers of the current property, such as IsConst or IsImplicitlyDereferenced.


为托管编译器设计人员提供了 GetOptionalCustomModifiersGetRequiredCustomModifiers 方法。The GetOptionalCustomModifiers and GetRequiredCustomModifiers methods are provided for designers of managed compilers. 有关自定义修饰符的详细信息,请参阅 ECMA Partition II 文档中的 IsBoxed 和相关类 System.Runtime.CompilerServices 命名空间和元数据规范。For more information on custom modifiers, see IsBoxed and related classes in the System.Runtime.CompilerServices namespace and the metadata specification in the ECMA Partition II documentation. 可联机获取该文档;请参阅 MSDN 上的 ECMA C# 和公共语言基础结构标准和 Ecma International 网站上的标准 ECMA-335 - 公共语言基础结构 (CLI)The documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.