Skip to main content

XPTypeInfo.GetAttributeInfo(String) Method

Returns the attribute with the specified name.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public Attribute GetAttributeInfo(
    string name
)

Parameters

Name Type Description
name String

A String value which specifies the name of the attribute to retrieve.

Returns

Type Description
Attribute

A Attribute descendant with the specified name. null (Nothing in Visual Basic) if an attribute with the specified name isn’t found. In this case a RequiredAttributeMissingException exception is thrown.

Remarks

The GetAttributeInfo method scans the XPTypeInfo.Attributes collection for an element whose name matches the name parameter. Use the XPTypeInfo.HasAttribute method to determine whether the type’s attribute collection contains the specified attribute.

See Also