Remove( ) method (Collections)
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Removes the element from the collection. Returns TRUE if the element is successfully removed; otherwise returns FALSE.
For a List<T>, removes the first occurrence of the specified
object from the list.
For a SortedSet<T>, removes the element, if it can be found,
according to the comparer implementation (default or custom). Note that the
implementation always uses the comparer when determining if the object can be found
in the collection. The comparer implementation decides that an object is the same by
returning the value zero to the sorted set remove operation.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Collections.List<T> class, Progress.Collections.SortedSet<T> class
Syntax
|
- element
- The object to remove from the collection.
Notes
- Any iterators on the collection become invalid once
Add(),AddAll(),Clear(),Insert(),Remove(),RemoveAt(), orSet()are called, and you must get a new iterator to iterate over the collection. - For a
SortedSet<T>,Remove()raises an error if the comparer object specified via the specific constructor becomes invalid, or if the comparer raises an error. - When an object-oriented ABL object is removed from a collection, the reference count of the object is decremented so that garbage collection can occur when the application no longer references the object.