This documentation is archived and is not being maintained.

PropertyAttributes Enumeration

Defines the attributes that can be associated with a property. These attribute values 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)

[<SerializableAttribute>]
[<ComVisibleAttribute(true)>]
[<FlagsAttribute>]
type PropertyAttributes

Member nameDescription
Supported by the XNA FrameworkNoneSpecifies that no attributes are associated with a property.
Supported by the XNA FrameworkSpecialNameSpecifies that the property is special, with the name describing how the property is special.
Supported by the XNA FrameworkReservedMaskSpecifies a flag reserved for runtime use only.
Supported by the XNA FrameworkRTSpecialNameSpecifies that the metadata internal APIs check the name encoding.
Supported by the XNA FrameworkHasDefaultSpecifies that the property has a default value.
Supported by the XNA FrameworkReserved2Reserved.
Supported by the XNA FrameworkReserved3Reserved.
Supported by the XNA FrameworkReserved4Reserved.

To get the PropertyAttributes, first get the class Type. From the Type, get the PropertyInfo. From the PropertyInfo, get the Attributes.

The enumerated value is a number representing the bitwise OR of the attributes implemented on the method.

The following example builds three properties and displays the PropertyAttributes enumerated value. Note that the read-only property has no setter and thus cannot be changed by.Caption = statement.

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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