I have a widget class:
public class Widget
{
...
public string UniqueID = "856D9PWW";
public int Price = 325;
public byte[] Data;
...
}
I would like a data structure to store my widgets in. Here's the catch - sometimes I need to find a group of widgets based in their price, and sometimes I need to find a specific widget based on it's ID.
I do not want to use two data structures and use each of them when necessary and remove it from the other when I remove it from the first (this includes creating my own data structure that does this 'under the covers'). I would like on data structure, that allows me to use multiple keys, that only needs to remove an item from it using one of the keys, and has the capibility to store multiple items under one of the keys.