Dictionary.GetIterator

From Xojo Documentation

Method

Dictionary.GetIterator() As Iterator

New in 2019r2

Supported for all project types and targets.

Creates a new iterator for the Dictionary which will yield DictionaryEntry objects for its values that you can iterate through using For Each...Next. Part of the Iterable interface.

Notes

You will not access this method directly. Instead use the ability to iterate over the Dictionary using a For Each...Next loop.

Sample Code

Iterate over the Dictionary entries using For Each..Next:

Var d As New Dictionary
d.Value("One") = "Testing"
d.Value("Two") = "Iterator"

For Each entry As DictionaryEntry In d
TextArea1.Value = TextArea1.Value + " " + entry.Key + " " + entry.Value
Next