I apologize if this is a dumb question, but hear me out:
Dictionary<string, string> genericDict = new Dictionary<string, string>;
genericDict.Add("blah", "bloop");
// Use the copy constructor to create a copy of this dictionary
return new Dictionary<string, string>(genericDict);
In the above code sample, I can create a copy of a generic dictionary.
Now suppose I'm using a System.Collections.Specialized.StringDictionary, because I don't feel like typing the "string" types everywhere. StringDictionary has no copy constructor! In fact, it only has the default constructor.
Sure, I can iterate through the StringDictionary and add each key/value pair manually, but I don't want to :-P
Why no copy constructor? Am I missing something here?