Time to stop using non-generic collections

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.

Technorati tags: , ,
VN:F [1.9.9_1125]
Rate this post
Rating: 0.0/10 (0 votes cast)

Related posts:

  1. PivotViewer comes to SilverLight – data as visual collections
  2. Speeding page load with dynamic JavaScript
  3. Ugly Flash: auto-play audio with no stop button
  4. SQLite and Delphi 2009
  5. IE7 script madness

2 comments to Time to stop using non-generic collections

  • 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……

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>