What’s the best way to keep a collection-object (List in example) in a Key/Value situation, where the key is a ID and the value is a collection of a type T?
Is this the only option or is there a better solution/another collection for this in .NET 3.5?
var x = new Dictionary<int, List<type>>();
This is a good solution and will work quite well – you are effectively using a dictionary object of { key = int, value = 4 byte reference }.
When you retrieve a value by the key you will get back the reference to the
List<T>on the heap and be able to use it. This will be a very efficent and compact solution to your apparent problem.