I have a class which inherit a dictionary.
class SymbolsWithQuotes: Dictionary<string, IList<Quotes>> // ex: key: AAPL value: quotations for the last year { // Empty class } At first, I think its a good idea to inherit a dictionary for readability but now I have a Linq query where I end the statement by:
ToDictionary(x => x.Key, y => y.Value.ArrayObjects() .Select(blabla)); And I have no idea how to cast it to my class SymbolsWithQuotes.
So three questions:
1 / Was is it a good idea to inherit a dictionary for readability ?
2 / Is there a solution to cast my linq query to my object SymbolsWithQuotes
3 / Do you see an alternative solution easier to read and to maintain ? Or should I just use Dictionary> everywhere instead of object SymbolsWithQuotes
Thanks
[Edit] I precise that my linq Query does returns a type
Dictionary<string, IList<Quotes>>