OrderedDictionaryTKey, TValueGetEnumerator Method |
Returns an enumerator that enumerates all the entries in the dictionary. Each entry is
returned as a KeyValuePair<TKey,TValue>.
The entries are enumerated in the sorted order of the keys.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic override sealed IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
public:
virtual IEnumerator<KeyValuePair<TKey, TValue>>^ GetEnumerator() override sealed
Return Value
Type:
IEnumeratorKeyValuePairTKey,
TValueAn enumerator for enumerating all the elements in the OrderedDictionary.
Implements
IEnumerableTGetEnumerator
RemarksTypically, this method is not called directly. Instead the "foreach" statement is used
to enumerate the elements of the dictionary, which uses this method implicitly.
If an element is added to or deleted from the dictionary while it is being enumerated, then
the enumeration will end with an InvalidOperationException.
Enumeration all the entries in the dictionary takes time O(N log N), where N is the number
of entries in the dictionary.
See Also