Contains( ) method (Collections)
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Determines whether an element is in the collection. Returns TRUE if the element is found in the collection; otherwise returns FALSE.
Return type: LOGICAL
Access: PUBLIC
Applies to: Progress.Collections.List<T> class, Progress.Collections.SortedSet<T> class, Progress.Collections.KeySet<K> class
Syntax
|
- element
- The object to locate in the collection.
Notes
- For a
SortedSet<T>, the comparer is used to determine if the object can be found in the collection.Contains()raises an error if the comparer object specified via the specific constructor becomes invalid, or if the comparer raises an error. - For a
KeySet<K>, the equality comparer (default or custom) associated with the hash map linked to the key set object is called to determine if the key is found in the set or not.Contains()raises an error if the key value is invalid (if using the default equality comparer), or if the comparer raises error.