public BiDictionary(Dictionary <T1, T2> keysToValue) { KeyToValue = keysToValue; foreach (var keyValue in keysToValue) { ValueToKey.Add(keyValue.Value, keyValue.Key); } }
public void Add(T1 key, T2 value) { KeyToValue.Add(key, value); ValueToKey.Add(value, key); }