I'm setting up a Dictionary with values of some sort of collection type as follows:
IDictionary<string, ICollection<decimal>> goodPrices =
new Dictionary<string, List<decimal>>();
However, this line of code results in an compilation error about not being able to implicitly convert the right-hand side to the left-hand side. Obviously, the following line produces no error:
IDictionary<string, List<decimal>> goodPrices =
new Dictionary<string, List<decimal>>();
So what is the correct way of declaring "goodPrices" as a set of string-collection pairs without exposing the underlying implementation of the collection?