title: Generic Dictionary retrieve value
body: <p>I have the following C# class:</p>
  
  <pre><code>class BatchData
  {
      public string batchNumber { get; set; }
      public string processDate { get; set; }
      public int TotalRecords { get; set; }
      public int SuccessCount { get; set; }
  }
  </code></pre>
  
  <p>and a dictionary:</p>
  
  <pre><code>Dictionary&lt;int, BatchData&gt; BatchData = new Dictionary&lt;int, BatchData&gt;();
  </code></pre>
  
  <p>Now, I want to search the whole dictionary to see if the value </p>
  
  <pre><code>x
  </code></pre>
  
  <p>is held in:</p>
  
  <pre><code>BatchData.batchNumber 
  </code></pre>
  
  <p>eg</p>
  
  <p>for the whole dictionary, if </p>
  
  <pre><code>BatchData.batchNumber = x
  </code></pre>
  
  <p>I know Dictionary has a method</p>
  
  <pre><code>.contains
  </code></pre>
  
  <p>But I am not sure how I can apply this. </p>
  
  <p>EDIT: </p>
  
  <pre><code>BatchData.batchNumber = x
  </code></pre>
  
  <p>Can occur multiple times within the dictionary</p>