concept Dictionary in category c#

This is an excerpt from Manning's book Unity in Action: Multiplatform game development in C# with Unity 5.
Dictionary is another collection data structure provided by C#. Entries in the dictionary are accessed by an identifier (or key) rather than by their position in the list. This is similar to a hash table but more flexible, because the keys can be literally any type (for example, “Return the entry for this GameObject”).
Change the code in InventoryManager to use Dictionary instead of List. Replace everything from listing 8.14 with the code from the following listing.
Overall this code looks the same as before, but a few tricky differences exist. If you aren’t already familiar with Dictionary data structures, note that it was declared with two types. Whereas List was declared with only one type (the type of values that’ll be listed), a Dictionary declares both the type of keys (that is, what the identifiers will be) and the type of values.
A bit more logic exists in the AddItem() method. Whereas before every item was appended to the List, now we need to check if the Dictionary already contains that item; that’s what the ContainsKey() method is for. If it’s a new entry, then we’ll start the count at 1, but if the entry already exists, then increment the stored value.