Mr Andersson

Posts Tagged ‘bcl

ReadOnlyDictionary

leave a comment »

Since I started using .NET 2.0 I’ve been wondering why Microsoft didn’t provide a ReadOnlyDictionary<k,v> class in the BCL. I just stumbled upon some info where I found this:

internal class ReadOnlyDictionary<K, V> : IDictionary<K,V>, ICollection<KeyValuePair<K, V>>, IEnumerable<KeyValuePair<K, V>>, IDictionary, ICollection, IEnumerable
Name: MS.Internal.Utility.ReadOnlyDictionary
Assembly: WindowsBase, Version=3.0.0.0

This is an internal class in one of the libraries that is shipped with .Net Framework 3.0. But why didn’t that class make it into the System.Collections.ObjectModel namespace?
Probably the developers on the team developing the BCL didn’t have the time required to push this into the release. However, this suggestion has been on Microsoft Connect for a while.
I wonder if we can expect such a class for the next release…

Advertisements

Written by anderssonjohan

October 23, 2007 at 19:16

Posted in programming

Tagged with ,