public interface IDictionary<TKey, TValue> : ICollection<KeyValuePair<TKey, TValue>>, IEnumerable { ... TValue this[TKey key] {get; set; } // Main indexer by key ... }and - the index does not have to be numeric
public static void Main() { var xx = new Dictionary<string, int>(); xx.Add("01", 1); xx.Add("02", 2); xx["01"] = 7; Console.WriteLine("xx[\"01\"] = {0}", xx["01"]); //7 Console.ReadLine(); }