.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XPCollection(Session, XPBaseCollection, CriteriaOperator, Boolean) 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.v21.1.dll


public XPCollection(
    Session session,
    XPBaseCollection originalCollection,
    CriteriaOperator copyFilter,
    bool caseSensitive


Name Type Description
session Session

The Session that will be used to load and save persistent objects.

originalCollection XPBaseCollection

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

copyFilter CriteriaOperator

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

caseSensitive Boolean

true if string comparison operators specified by the copyFilter are case-sensitive; otherwise, false. This value is assigned to the XPBaseCollection.CaseSensitive property.


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 specified session to load and save persistent objects.

See Also