I have a Dictionary<int, Product>
. If the same Product is added to more than one key is an new instance of that object stored for each key? Or just a reference to the original object?
This collection is very large and each product will have between 1-10 Keys to it. My primary concern is memory allocation.
If Product is a reference type (class and not struct), only a reference will be stored.