XPTypeInfo.AddAttribute(Attribute) Method

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

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public void AddAttribute(
    Attribute attribute
)
Public Sub AddAttribute(
    attribute As Attribute
)
public void AddAttribute(
    Attribute attribute
)
Public Sub AddAttribute(
    attribute As Attribute
)

Parameters

Name Type Description
attribute Attribute

A Attribute descendant which represents the attribute for this type.

Parameters

Name Type Description
attribute Attribute

A Attribute descendant which represents the attribute for this type.

Remarks

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