KeyValuePair vs. DictionaryEntry [Krzysztof Cwalina]

We discussed a problem with implementation of IEnumerable on Dictionary<K,V>. What type should IEnumerable.GetEnumerator().Current return? KeyValuePair<K,V> or DictionaryEntry? Same for ICollection.CopyTo. Instances of what type should be copied to the array? We decided the following: IEnumerable and ICollection interface implementations will use KeyValuePair<K,V> as the item type. IDictionary specific members (GetEnumerator returning IDictionaryEnumerator) will use…

2

Notes from a design meeting [Kit George]

All, we’re going to start publishing topics from our design meeting notes. Feel free to send general feedback on the item,or to me directly (kitg@microsoft.com). Here’s a kick off on Collections: TrimToSize on collections. The basic issue here was whether always trimming on collections was the best thing to do. Right now, if you call…

6