Un Dictionary guarda datos en pares de clave y valor.

Necesita:

using System.Collections.Generic;

Crear un diccionario

Dictionary<string, int> precios = new Dictionary<string, int>();

En este ejemplo:


Agregar elementos

precios.Add("Pico", 100);
precios.Add("Espada", 250);

También:

precios["Arco"] = 300;

Obtener un valor

int precioPico = precios["Pico"];

Modificar un valor

precios["Pico"] = 150;