title: Should I use a C# Dictionary if I only need fast lookup of keys, and values are irrelevant?
body: <p>I am in need of a data type that is able to insert entries and then be able to quickly determine if an entry has already been inserted. A <code>Dictionary</code> seems to suit this need (see example). However, I have no use for the dictionary's <code>values</code>. Should I still use a dictionary or is there another better suited data type?</p>
  
  <pre><code>public class Foo
  {
      private Dictionary&lt;string, bool&gt; Entities;
  
      ...
  
      public void AddEntity(string bar)
      {
          if (!Entities.ContainsKey(bar))
          {
              // bool value true here has no use and is just a placeholder
              Entities.Add(bar, true);
          }
      }
  
      public string[] GetEntities()
      {
          return Entities.Keys.ToArray();
      }
  
  }
  </code></pre>