IDictionary Interface
Provides a type-independent dictionary interface using TValue-based keys and values.
Remarks
This interface abstracts dictionary operations so that strongly-typed dictionaries (such as TOrderedDictionary) can be accessed through a common, non-generic contract. Keys and values are passed as TValue, enabling uniform handling regardless of the underlying key and value types.
Syntax
Unit: Bcl.Collections
IDictionary = interface(IInterface);
Methods
| Name | Description |
|---|---|
| Add | Adds a new key-value pair to the dictionary. |
| AddOrSetValue | Adds a key-value pair, or updates the value if the key already exists. |
| Clear | Removes all key-value pairs from the dictionary. |
| ContainsKey | Determines whether the dictionary contains the specified key. |
| GetItem | Returns the value associated with the specified key. |
| SetItem | Sets the value associated with the specified key. |
| Remove | Removes the key-value pair with the specified key from the dictionary. |
| TryGetValue | Attempts to retrieve the value associated with the specified key. |
| GetEnumerator | Returns an enumerator that iterates over all key-value pairs in the dictionary. |
| GetOwnerships | Returns the ownership settings of the dictionary. |
Properties
| Name | Description |
|---|---|
| Items[const key] | Gets or sets the value associated with the specified key. |