System 2.0.0.0 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)

There are a few cases in the .NET Framework object model where a property is purposely typed to be vague. For example, the property is typed as object. The reason for this is that this property can accept several types of input. Unfortunately, this provides no common place to add metadata to describe the characteristics of the property. Each DataSource property throughout the .NET Framework needs to have identical metadata for type converters, UI type editors, and other services that require metadata. The remedies this situation.

Once this attribute is placed on a property, the rules for obtaining attributes for the property descriptor's collection differ. Typically, the property descriptor gathers local attributes, and then merges these with attributes from the property type. In this case, the attributes are taken from the type returned from the , not from the actual property type. This attribute is used on to point the object's specific type to , and the appropriate metadata is placed on to enable data binding. In so doing, external parties can easily add metadata to all data sources.

Attributes obtained from a type declared in the have a priority in between the attributes of the property’s type and the attributes on the property. The following list, in priority order, shows the full set of available merged attributes:

Property Attributes

Attribute Provider Attributes

Property Type Attributes

Enables attribute redirection. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class with the given type name.

  The name of the type to specify.
- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class with the given type.

  The type to specify.
- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class with the given type name and property name.

  The name of the type to specify.
  The name of the property for which attributes will be retrieved.
- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

  Gets the name of the property for which attributes will be retrieved.

- Property
  2.0.0.0
  4.0.0.0
  System.String To be added. To be added.

  Gets the assembly qualified type name passed into the constructor.