I am looking for a solution that lets me store and lookup multiple tuples. Dictionary only provides a simple way to lookup keys but not the values. I understand why (non-uniqueness possibility of values). However, what if each and every entry (keys and values) are strictly unique. Is there a collection that easily lets me store and lookup whatever key I chose and returns the matching field of such key? When looking up values I would necessarily have to specify the key field and the desired lookup field. I target C# 4.0
Example:
Collection<string, int, myEnum> myCollection = new ...
myCollection.Add("abc", 5, myEnum.First);
myCollection.Add("def", 6, myEnum.Second);
myCollection[int, myEnum, 6] = Second (of type myEnum) -> I just made up the way how a key and value field could be specified. Does such collection exist or would I need to roll my own?
I understand I am getting into the concept of tables but would like to avoid using a table structure if at all possible.
Note: The number of tuples will be limited to <20 (so if I rolled my own I would not be overly concerned with having to loop but I look for something more elegant)
Thanks