Dictionaries

A dictionary is an unordered collection of values, with each one accessed through a unique key. Let's look at the following diagram:

In our diagram, we have a dictionary of pizzas (keys) with their prices (values). To find something inside a dictionary, we must look it up according to its key. Let's look at a dictionary syntax:

Dictionary<Key, Value>

Now, that we understand what a dictionary is and its syntax let's look at how we can use it by creating our first dictionary.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.119.148