src/Foundation/Data/Gimela.Data.DataStructures/Collections/BidirectionalCollection.cs
/// <summary>
/// Tries to add the pair to the dictionary.
/// Throws an exception if either element is already in the dictionary
/// </summary>
/// <param name="first"></param>
/// <param name="second"></param>
Tries to add the pair to the dictionary.
Throws an exception if either element is already in the dictionary
Tries to add the pair to the dictionary . Throws an exception if either element is already in the dictionary
public void Add(TFirst first, TSecond second)
    {
      if (firstToSecond.ContainsKey(first) || secondToFirst.ContainsKey(second))
        throw new ArgumentException("Duplicate first or second");
      firstToSecond.Add(first, second);
      secondToFirst.Add(second, first);
    }
public void Add ( TFirst first , TSecond second ) { if ( firstToSecond . ContainsKey ( first ) || secondToFirst . ContainsKey ( second ) ) throw new ArgumentException ( " " ) ; firstToSecond . Add ( first , second ) ; secondToFirst . Add ( second , first ) ; }
Tries to add the pair to the dictionary.
Tries to add the pair to the dictionary .
first
TFirst
None
second
TSecond
None