Skip to main content
A newer version of this page is available. .

XPTypeInfo.FindAttributeInfo(Type) Method

Searches for an attribute of the specified type.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public Attribute FindAttributeInfo(
    Type attributeType
)

Parameters

Name Type Description
attributeType Type

A Type descendant which represents the type of the attribute to search for.

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.

Remarks

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

It’s also possible to use the XPTypeInfo.GetAttributeInfo method to obtain an attribute of the specified type. The difference between the XPTypeInfo.GetAttributeInfo and FindAttributeInfo methods is that the XPTypeInfo.GetAttributeInfo method throws an RequiredAttributeMissingException if an attribute of the specified type isn’t found.

See Also