I'm using a Dictionary
where the int
is a count of the key.
अब, मुझे शब्दकोश के अंदर अंतिम डाली गई कुंजी तक पहुंचने की ज़रूरत है, लेकिन मुझे इसका नाम पता नहीं है। स्पष्ट प्रयास:
int LastCount = mydict[mydict.keys[mydict.keys.Count]];
काम नहीं करता है, क्योंकि Dictionary.Keys
एक [] -indexer लागू नहीं करता है।
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?