Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

BaseObjectSpace.FindObject(Type, CriteriaOperator) Method

Searches for the first object of the specified type, matching the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public object FindObject(
    Type objectType,
    CriteriaOperator criteria
)

Parameters

Name Type Description
objectType Type

A Type object which is the type of the object to search for.

criteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which is the criteria to match persistent objects.

Returns

Type Description
Object

An object which is the first persistent object which matches the specified criteria. null (Nothing in Visual Basic) if there is no persistent object which matches the criteria.

Remarks

To find the specified object, this method invokes a public virtual FindObject method that does nothing and returns null. So, the details on how the objects are searched depend on how the FindObject virtual method is overridden in a particular descendant of the BaseObjectSpace class.

See Also