I want a dictionary that would return a specified value for any key not in the dictionary, something like:
var dict = new DictWithDefValues("not specified");
dict.Add("bob78", "Smart");
dict.Add("jane17", "Doe");
Assert.AreEqual(dict["xxx"], "not specified");
Extending System.Collections.Generics.Dictionary and overriding TryGetValue doesn't work because TryGetValue isn't virtual.
Reimplementing Dictionary from scratch (from IDictionary<,>) is too much efforts.
Extension method won't let me "initialize" the dictionary with a default value. I want the consumer of dictionary to think that key is there, not just do dict.GetOrDefault(key, "not specified");