Skip to main content
.NET 8.0+

DevExpress v25.1 Update — Your Feedback Matters

Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IBaseInfo.AddAttribute(Attribute) Method

Dynamically associates an attribute to the current type at run time.

Namespace: DevExpress.ExpressApp.DC

Assembly: DevExpress.ExpressApp.v25.1.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

void AddAttribute(
    Attribute attribute
)

#Parameters

Name Type Description
attribute Attribute

A descendant of the System.Attribute class that represents the attribute which will be associated with the current type at run time.

#Remarks

C#
ITypeInfo typeInfo1 = typesInfo.FindTypeInfo(typeof(PersistentObject1));
typeInfo1.AddAttribute(new DevExpress.Persistent.Base.DefaultClassOptionsAttribute());
// ...
typesInfo.RefreshInfo(typeof(PersistentObject1));

View Example: XAF - Customize an XPO Business Model at Runtime

See Also