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