<p>Something I do often if I'm storing a bunch of string values and I want to be able to find them in O(1) time later is:</p>

<pre><code>foreach (String value in someStringCollection)
{
    someDictionary.Add(value, String.Empty);
}
</code></pre>

<p>This way, I can comfortably perform <strong>constant-time</strong> lookups on these string values later on, such as:</p>

<pre><code>if (someDictionary.containsKey(someKey))
{
    // etc
}
</code></pre>

<p>However, I feel like I'm cheating by making the value <strong>String.Empty</strong>. Is there a more appropriate .NET Collection I should be using?</p>

If you're using .Net 3.5, try
HashSet
. If you're not using .Net 3.5, try
C5
. Otherwise your current method is ok (bool as @leppie suggests is better, or not as @JonSkeet suggests, dun dun dun!).
```
```
HashSet<string> stringSet = new HashSet<string>(someStringCollection);

if (stringSet.Contains(someString))
{
    ...
}
```
```