This documentation is archived and is not being maintained.

FieldInfo.GetOptionalCustomModifiers Method

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

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

public virtual Type[] GetOptionalCustomModifiers()

Return Value

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

The GetOptionalCustomModifiers and GetRequiredCustomModifiers methods are provided for designers of managed compilers. 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. 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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: