Skip to main content
.NET 6.0+

XPCollection(XPBaseCollection, CriteriaOperator) Constructor

Initializes a new instance of the XPCollection class by copying objects from a specific collection using specified settings.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.2.dll

NuGet Package: DevExpress.Xpo

Declaration

public XPCollection(
    XPBaseCollection originalCollection,
    CriteriaOperator filter
)

Parameters

Name Type Description
originalCollection XPBaseCollection

An XPBaseCollection from which objects are copied to the newly created collection.

filter CriteriaOperator

The CriteriaOperator that specifies the criteria for object selection from the originalCollection.

Remarks

If the XPBaseCollection.LoadingEnabled property is set to true (default value) the collection is populated with objects when its contents are accessed for the first time (for instance, when the XPBaseCollection.Count property is read).

The newly created collection will use the same session as the originalCollection to load and save persistent objects.

See Also