I use a wrapper around a Dictionary<T, object>
, storing nulls in the values. This gives O(1) add, lookup and remove on the keys, and to all intents and purposes acts like a set.
↧
Answer by thecoop for C# Set collection?
↧