The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

XPTypeInfo.FindAttributeInfo(Type) Method

Searches for an attribute of the specified type.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public Attribute FindAttributeInfo(Type attributeType)
Public Function FindAttributeInfo(attributeType As Type) As Attribute
public Attribute FindAttributeInfo(Type attributeType)
Public Function FindAttributeInfo(attributeType As Type) As Attribute

Parameters

Name Type Description
attributeType Type

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

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.

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