value · System
DictionaryIterator<K, V>
public value DictionaryIterator<K : IHashable<K>, V>
The pairs of a dictionary, in the table's order.
- Kind
- value
- Namespace
- System
- Assembly
- System.Core
- Access
- public
- Source file
Dictionary.ant
Type parameters
| Name | Constraints |
|---|---|
K | IHashable<K> |
V | any type |
Constructors
new(Dictionary<K, V> map)
#
Properties
KeyValuePair<K, V> Current { get; }
#
Methods
Private and internal members (2)
Dictionary<K, V> map
#
Source
DictionaryIterator<K, V> as Antril, decompiled from its Larva HIR.
// System.DictionaryIterator — System.Core (decompiled from Larva HIR)
into namespace System
{
/// The pairs of a dictionary, in the table's order.
public value DictionaryIterator<K : IHashable<K>, V>
{
Dictionary<K, V> map;
i32 slot;
public:
new(Dictionary<K, V> map)
{
this.map = map;
slot = -1;
}
Next() : bool
{
i32 slots = map.Slots;
slot++;
loop (slot < slots && !map.Holds(slot))
slot++;
return slot < slots;
}
KeyValuePair<K, V> Current
{
get => new KeyValuePair<K, V>(map.KeyAt(slot), map.ValueAt(slot));
}
}
}