XPTypeInfo.AddAttribute(Attribute) Method
Adds a new attribute to the attribute collection of the type.
Namespace: DevExpress.Xpo.Metadata
Assembly: DevExpress.Xpo.v24.2.dll
Declaration
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AddAttribute(Attribute) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.