title: How to check if a value in a struct variable is in a Dictionary?
body: <p>I have a struct setup like the following:</p>
  
  <pre><code> Private Structure PersonInfo
       Dim FirstName As String
       Dim LastName As String
       Dim Code As Integer   
       Dim Primary As Boolean
   End Structure
  </code></pre>
  
  <p>I have a Dictionary setup as:</p>
  
  <pre><code>Dim listPersonInfo As New Dictionary(Of Integer, PersonInfo)
  </code></pre>
  
  <p>I then loop through a counter and add each PersonInfo object to the Dictionary.  The Primary defaults to false if the Code is already in the Dictionary, but if it has not been inserted into the Dictionary, I want to set the Primary to True.  It would be easy to check if the Code was the key, but I can't because the Code is not unique.</p>