Search⌘ K
AI Features

Dictionary

Explore how dictionaries function as key-value data structures in C#. Understand how to instantiate, update, loop through, and remove items effectively, allowing you to handle data collections with meaningful keys.

What is a dictionary?

A dictionary consists of a key and a value. In an array, the key is created automatically (0, 1, and so on). With dictionaries, the key name can be set to something meaningful. As with lists, dictionaries use generics.

To use a dictionary, add the following line of code: ...