This is one for .NET programmers. Do you use collection classes like ArrayList or HashTable? These are useful in .NET 1.0 and 1.1, but .NET 2.0 and higher has generic collections like List<T> and Dictionary<K,V> which are safer and more efficient. It’s time to tidy up your code, because in Silverlight’s implementation of .NET these non-generic collection types have been removed completely. The BCL Team Blog has the details, together with a handy guide on how to convert your non-generic collections. Of course you can simulate non-generic collections by declaring collections of type Object, so there’s no reason to continue using the old collection types.
2 thoughts on “Time to stop using non-generic collections”
Comments are closed.
Ive found when adding + enumerating over 2million + obejcts , a hashtable to be far quicker than a List object, with smaller data the list is fine but it starts to become slow with large volumes.
Just my 5 cent
erm doh sorry didnt read the and Dictonary part, dictionary uses a hashtable so use dictionary……