I'm using a Dictionary
where the int
is a count of the key.
Acum, trebuie să accesez ultima cheie introdusă în dicționar, dar nu-i cunosc numele. Tentativă evidentă:
int LastCount = mydict[mydict.keys[mydict.keys.Count]];
nu funcționează, deoarece Dictionary.Keys
nu implementează un index [].
I just wonder if there is any similar class? I thought about using a Stack, but that only stores a string. I could now create my own struct and then use a Stack
, but I wonder if there is another alternative, essentially a Dictionary that implements an []-indexer on the Keys?