title: C# Dictionaries - Custom Objects
body: <p>I've never used Dictionaries before, and I'm just looking to learn more about them.</p>
  
  <p>I'm a bit lost when it comes to Custom Objects. Is it possible to use a custom object like the class below, as the Key, rather than the value?</p>
  
  <pre><code>class Car
      {
          public Car(int id, string model)
          {
              ID = id;
              Model = model;
          }
  
          public int ID { get; private set; }
          public string Model { get; private set; }
      }
  </code></pre>
  
  <p>If you where to create a Dictionary, Like this :-</p>
  
  <pre><code> Dictionary&lt;Car, bool&gt; Cars = new Dictionary&lt;Car, bool&gt;();
  </code></pre>
  
  <p>How would you use the Car object as a Key, when searching the Dictionaries contents?</p>