Skip to main content
.NET Framework 4.5.2+

XPObjectSpace.FindObject(Type, CriteriaOperator, Boolean) Method

Searches for the first object which matches the specified criteria.

Namespace: DevExpress.ExpressApp.Xpo

Assembly: DevExpress.ExpressApp.Xpo.v22.2.dll

NuGet Package: DevExpress.ExpressApp.Xpo


public override object FindObject(
    Type objectType,
    CriteriaOperator criteria,
    bool inTransaction


Name Type Description
objectType Type

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

criteria CriteriaOperator

A DevExpress.Data.Filtering.CriteriaOperator descendant which is the criteria for matching persistent objects.

inTransaction Boolean

true if all objects (in the database and retrieved) are processed by the specified criteria; otherwise, false.


Type Description

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.


This method searches for an object, both if the specified object type is a class and if the specified object type is an interface.

Persistent objects that are marked for deletion are not included in the search.

To learn how to use this method, refer to the IObjectSpace.FindObject(Type, CriteriaOperator, Boolean) method description.

See Also