XPCollection<T>.Add(T) Method
Adds a specified persistent object to the XPCollection<T>.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
new |
T | A T persistent object to add to the collection. This can be any object that implements the IXPSimple |
#Remarks
Once an XPCollection<T> is loaded, it contains T objects that match the specified criteria (see XPBaseCollection.Criteria). When you add a T object (newObject), the collection does not check whether this object matches the criteria or not.
Note
You cannot add an object whose type is not the same or not inherited from the type specified by the XPCollection