XPCollection<T>.AddRange(IEnumerable<T>) Method
Adds specified persistent objects to the XPCollection<T>.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Parameters
Name | Type | Description |
---|---|---|
objects | IEnumerable<T> | An IEnumerable<T> object, which is a collection of T persistent objects to add to the XPCollection<T>. |
Remarks
A persistent object is an object that implements the IXPSimpleObject interface or has the PersistentAttribute attribute.
Once an XPCollection<T> is loaded, it contains T objects that match the specified criteria (see XPBaseCollection.Criteria). When you add T objects, the collection does not check whether these objects match the criteria or not.
Note
You cannot add objects whose type is not the same or not inherited from the type specified by the XPCollection<T>.GetObjectClassInfo method. In addition, you cannot add an object more than once. Doing so does not raise an exception, but the object will not be added to the collection.