| Start |
|---|
Create a dictionary filled with values This creates a dictionary and immediately fills it with three KeyValuePairs. You can also add new values later on by using the Add method: Note that the key (the first parameter) needs to be unique in the dictionary, otherwise an Exception will be thrown. |
| Loop through a dictionary and print all entries Each pair in the dictionary is an instance of |
| Getting a dictionary value You can get the value of an entry in the dictionary using the 'Item' property: If the key is not present in the dictionary, a KeyNotFoundException will be thrown. |
| Checking for key already in dictionary - data reduction The This come in handy for data reduction. In the sample below, each time we encountner a new word, we add it as a key in the dictionary, else we increment the counter for this specific word. XML reduction example : getting all the child nodes names and occurence in an branch of an XML document |
Read Article
https://develop.horje.com/learn/1434/reference