BiDictionary<TFirst, TSecond> Class

This is a dictionary guaranteed to have only one of each value and key. It may be searched either by TFirst or by TSecond, giving a unique answer because it is 1 to 1.
Public Class BiDictionary(Of  _ 
TFirst, _ 
TSecond)
This language is not supported or no code example is available.
public class BiDictionary<TFirst, TSecond>
This language is not supported or no code example is available.

Type Parameters

TFirst

The type of the "key"

TSecond

The type of the "value"

Name Description
Public property Count The number of pairs stored in the dictionary
Public property FirstValues
Public property SecondValues
Top
Methods
 
Name Description
Public method Add(TFirst, TSecond) Tries to add the pair to the dictionary. Throws an exception if either element is already in the dictionary
Public method Clear() Removes all items from the dictionary.
Public method ContainsByFirst(TFirst)
Public method ContainsBySecond(TSecond)
Public method Equals(Object) (inherited from Object).
Protected method Finalize (inherited from Object).
Public method GetByFirst(TFirst) Find the TSecond corresponding to the TFirst first Throws an exception if first is not in the dictionary.
Public method GetBySecond(TSecond) Find the TFirst corresponding to the Second second. Throws an exception if second is not in the dictionary.
Public method GetHashCode (inherited from Object).
Public method GetType (inherited from Object).
Protected method MemberwiseClone (inherited from Object).
Public method RemoveByFirst(TFirst) Remove the record containing first. If first is not in the dictionary, throws an Exception.
Public method RemoveBySecond(TSecond) Remove the record containing second. If second is not in the dictionary, throws an Exception.
Public method ToString (inherited from Object).
Public method TryAdd(TFirst, TSecond) Tries to add the pair to the dictionary. Returns false if either element is already in the dictionary
Public method TryGetByFirst(TFirst, out TSecond) Find the TSecond corresponding to the TFirst first. Returns false if first is not in the dictionary.
Public method TryGetBySecond(TSecond, out TFirst) Find the TFirst corresponding to the TSecond second. Returns false if second is not in the dictionary.
Public method TryRemoveByFirst(TFirst) Remove the record containing first, if there is one.
Public method TryRemoveBySecond(TSecond) Remove the record containing second, if there is one.
Top
devDept.Eyeshot.BiDictionary<TFirst, TSecond>

.NET Framework

Supported in: 4.7.2

In this article

Definition