I want the functionality of a Dictionary, but I want to store multiple values for each key. How can this be done in .NET/C#? Is there any built in collection that supports this scenario?
If I do the following:
collection.Add("key1", new Order(1));
collection.Add("key1", new Order(2));
collection.Add("key1", new Order(3));
collection.Add("key2", new Order(4));
Then running the following should return 3 orders.
collection["key1"];