1. is it possible to add two arguments somehow in a HashSet?

    This Works
    Code:
    public HashSet<PlayerFigures> PlayerFigures = new HashSet<PlayerFigures>();
    This is what i want
    Code:
    public HashSet<ulong, PlayerFigures> PlayerFigures = new HashSet<ulong, PlayerFigures>();
    Like dictionary but with HashSet instead
    Code:
    public Dictionary<ulong, PlayerFigures> PlayerFigures = new Dictionary<ulong, PlayerFigures>();
     
  2. Technically, you could add a Tuple or KeyValuePair containing your ulong and PlayerFigures to the HashSet, but why can't you use Dictionary?
     
  3. I have been told HashSet is faster
     
  4. How are you using or intend to use the data you wish to store in the HashSet (the ulong and PlayerFigures)? Are you just going to iterate over it, or do lookups? Even if HashSet is generally "faster", that's irrelevant depending on what it's used for.
    [DOUBLEPOST=1487084613][/DOUBLEPOST]If your ulong is going to store a userID (which is what I suspect from the context), and you need to lookup that userID to get the PlayerFigures, then Dictionary is your best option. Otherwise, you'll have to iterate over all of the entries in the HashSet and check each userID (which is slower than a Dictionary lookup).
     
  5. the data will be constantly changed, storing levels etc