public TwoKeys <TKey1, TKey2>[] KeysToArray() { KeyValuePair <TKey1, TKey2>[] keys = llistaClau1.ToArray(); TwoKeys <TKey1, TKey2>[] twoKeys = new TwoKeys <TKey1, TKey2> [keys.Length]; for (int i = 0; i < keys.Length; i++) { twoKeys[i] = new TwoKeys <TKey1, TKey2>(keys[i].Key, keys[i].Value); } return(twoKeys); }
public TValue this[TwoKeys <TKey1, TKey2> key] { get { return(llista1[key.Key1]); } set { llista1[key.Key1] = value; llista2[llistaClau1[key.Key1]] = value; } }
bool IDictionary <TwoKeys <TKey1, TKey2>, TValue> .TryGetValue(TwoKeys <TKey1, TKey2> key, out TValue value) { return(((IDictionary <TKey1, TValue>)llista1).TryGetValue(key.Key1, out value)); }
public bool Remove(TwoKeys <TKey1, TKey2> key) { return(Remove1(key.Key1)); }
public void Add(TwoKeys <TKey1, TKey2> key, TValue value) { Add(key.Key1, key.Key2, value); }
public bool ContainsKey(TwoKeys <TKey1, TKey2> key) { return(llistaClau1.ContainsKey(key.Key1) && llistaClau2.ContainsKey(key.Key2)); }