Is there a class like Dictionary<> in C#, but for just keys, no values?

Solution 1:

Try using the HashSet<T> class.

Edit: I spent a long long time doing exactly what you did until I just stumbled on this class while reading a blog.