This documentation is archived and is not being maintained.

FieldInfo.GetOptionalCustomModifiers Method

Note: This method is new in the .NET Framework version 2.0.

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 ()
public Type[] GetOptionalCustomModifiers ()
public function GetOptionalCustomModifiers () : Type[]

Return Value

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 Partition II documentation is available online at http://msdn.microsoft.com/net/ecma/ and http://www.ecma-international.org/publications/standards/Ecma-335.htm.

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

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

.NET Framework

Supported in: 2.0
Show: