ParameterAttributes Enumeration
TOC
Collapse the table of content
Expand the table of content

ParameterAttributes Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Defines the attributes that can be associated with a parameter. These are defined in CorHdr.h.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

No code example is currently available or this language may not be supported.

Member nameDescription
HasDefaultSpecifies that the parameter has a default value.
HasFieldMarshalSpecifies that the parameter has field marshaling information.
InSpecifies that the parameter is an input parameter.
LcidSpecifies that the parameter is a locale identifier. Not supported. Present in Windows Phone.
NoneSpecifies that there is no parameter attribute.
OptionalSpecifies that the parameter is optional.
OutSpecifies that the parameter is an output parameter.
Reserved3Reserved.
Reserved4Reserved.
ReservedMaskSpecifies that the parameter is reserved.
RetvalSpecifies that the parameter is a return value.

To get the ParameterAttributes value, first get the Type. From the Type, get the ParameterInfo array. The ParameterAttributes value is within the array.

These enumerator values are dependent on optional metadata. Not all attributes are available from all compilers. See the appropriate compiler instructions to determine which enumerated values are available.

The following example displays the attributes of four parameters.

No code example is currently available or this language may not be supported.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft