XPTypeInfo.GetAttributeInfo(Type) Method

Returns the attribute of the specified type.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v21.2.dll

Declaration

public Attribute GetAttributeInfo(
    Type attributeType
)

Parameters

Name Type Description
attributeType Type

A Type descendant which represents the type of the attribute to retrieve.

Returns

Type Description
Attribute

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

Remarks

Use the XPTypeInfo.HasAttribute method to determine whether the XPTypeInfo.Attributes collection contains an attribute of the specified type.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetAttributeInfo(Type) 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.

See Also