Associates a value with the given key. If a value is already associated with the given key, the value is replaced. If the key does not already appear in the map then Set() inserts the key and value into the map using the same rules as Add( ) method (Map Collections).

Return type: VOID

Access: PUBLIC

Applies to: Progress.Collections.HashMap<K,V> class

Syntax

Set(key AS K, value AS V)
key
The key to locate/add to the collection.
value
The object to be associated with key.
The method raises an error if:
  • The key object does not implement Progress.Collections.IHashable, if using the default equality comparer implementation.
  • The key object is not a valid object reference (including the Unknown value (?)), if using the default equality comparer.
  • The equality comparer object specified via the specific constructor has become invalid.
  • The custom equality comparer raises an error.

See also

<T> Generic type reference