System.Reflection.FieldInfo.GetOptionalCustomModifiers Method

Gets an array of types that identify the optional custom modifiers of the field.

Syntax

public virtual Type[] GetOptionalCustomModifiers ()

Returns

An array of Type objects that identify the optional custom modifiers of the current field, such as System.Runtime.CompilerServices.IsConst.

Remarks

The FieldInfo.GetOptionalCustomModifiers and FieldInfo.GetRequiredCustomModifiers methods are provided for designers of managed compilers. For more information on custom modifiers, see System.Runtime.CompilerServices.IsBoxed and related classes in the System.Runtime.CompilerServices namespace and the metadata specification in the ECMA Partition II documentation. The documentation is available online; see tp://go.microsoft.com/fwlink/?LinkID=99212 on MSDN and tp://go.microsoft.com/fwlink/?LinkID=65552 on the Ecma International Web site.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0