value · System
DictionaryIterator<K, V>
public value DictionaryIterator<K : IHashable<K>, V>
The pairs of a dictionary, in the table's order.
- Tipo
- value
- Espacio de nombres
- System
- Ensamblado
- System.Core
- Acceso
- public
- Archivo fuente
Dictionary.ant
Parámetros de tipo
| Nombre | Restricciones |
|---|---|
K | IHashable<K> |
V | cualquier tipo |
Constructores
new(Dictionary<K, V> map)
#
Propiedades
KeyValuePair<K, V> Current { get; }
#
Métodos
Miembros privados e internos (2)
Dictionary<K, V> map
#
Código fuente
DictionaryIterator<K, V> en Antril, descompilado a partir de su 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));
}
}
}