title: Using KeyValuePair in VB.NET for a reverse lookup capable dictionary (example hint in C# needs converting)
body: <p>I'm currently on a VB.NET project and wish to use a KeyValuePair to facilitate a reverse lookup.</p>
  
  <p>I've found a great example in C# here: <a href="http://www.dreamincode.net/forums/showtopic78080.htm" rel="nofollow noreferrer">http://www.dreamincode.net/forums/showtopic78080.htm</a>, however I am having a small problem converting to VB.NET (both manually and using a translator (online carlosag)). For example the syntax I would expect in the Add method is as follows:</p>
  
  <pre><code>    Public Sub Add(ByVal key As TKey, ByVal value As TValue)
          Me.Add(New KeyValuePair(Of Tkey(key, value))
      End Sub
  </code></pre>
  
  <p>Whereas this tells me <i>"Too few type arguments to 'System.Collections.Generic.KeyValuePair(Of TKey, TValue)'"</i></p>
  
  <p>Any assistance would sure be helpful (indeed as would a full translation of the example including anon methods :D. </p>