src/Foundation/Data/Gimela.Data.DataStructures/Collections/BidirectionalCollection.cs
/// <summary>
/// Remove the record containing first.
/// If first is not in the dictionary, throws an Exception.
/// </summary>
/// <param name="first">the key of the record to delete</param>
Remove the record containing first.
If first is not in the dictionary, throws an Exception.
Remove the record containing first . If first is not in the dictionary throws an Exception .
public void RemoveByFirst(TFirst first)
    {
      TSecond second;
      if (!firstToSecond.TryGetValue(first, out second))
        throw new KeyNotFoundException("Cannot find second by first.");
      firstToSecond.Remove(first);
      secondToFirst.Remove(second);
    }
public void RemoveByFirst ( TFirst first ) { TSecond second ; if ( ! firstToSecond . TryGetValue ( first , out second ) ) throw new KeyNotFoundException ( " " ) ; firstToSecond . Remove ( first ) ; secondToFirst . Remove ( second ) ; }
Remove the record containing first.
Remove the record containing first .
first
TFirst
the key of the record to delete
the key of the record to delete