Skip to main content
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseObjectSpace.FindObject<ObjectType>(CriteriaOperator) Method

Searches for the first object of the type designated by the specified generic type parameter, matching the specified criteria.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public ObjectType FindObject<ObjectType>(
    CriteriaOperator criteria
)

#Parameters

Name Type Description
criteria CriteriaOperator

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

#Type Parameters

Name
ObjectType

#Returns

Type Description
ObjectType

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