XPTypeInfo.AddAttribute(Attribute) Method

Adds a new attribute to the attribute collection of the type.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v21.1.dll


public void AddAttribute(
    Attribute attribute


Name Type Description
attribute Attribute

A Attribute descendant which represents the attribute for this type.


The collection of attributes can be accessed via the XPTypeInfo.Attributes property.

If the collection contains the attribute being added by the AddAttribute method, the old attribute is replaced by the new one. To ensure that the type has a specific attribute use the XPTypeInfo.HasAttribute method.

See Also