I've defined a Dictionary with some custom type like this,
public readonly Dictionary<PricingSection, View> _viewMappings = new Dictionary<PricingSection, View>();
Now when i try to do
_viewMappings.GetValueOrDefault(section);
section is of type PricingSection
i'm getting an error saying
Severity Code Description Project File Line Suppression State Error CS1061 'Dictionary' does not contain a definition for 'GetValueOrDefault' and no accessible extension method 'GetValueOrDefault' accepting a first argument of type 'Dictionary' could be found (are you missing a using directive or an assembly reference?)
Am i missing something ??
Dictionary
contains that method? – Yurii N.Dictionary
. – Yurii N.IReadOnlyDictionary
whichDictionary
implements. So this will work for 2.2. – Guy