Skip to main content
.NET 8.0+

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

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