{"id":267,"date":"2007-07-02T16:40:54","date_gmt":"2007-07-02T15:40:54","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/?p=267"},"modified":"2007-07-02T16:40:54","modified_gmt":"2007-07-02T15:40:54","slug":"time-to-stop-using-non-generic-collections","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/267-time-to-stop-using-non-generic-collections.html","title":{"rendered":"Time to stop using non-generic collections"},"content":{"rendered":"<p>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&lt;T&gt; and Dictionary&lt;K,V&gt; which are safer and&nbsp;more efficient. It&#8217;s time to tidy up your code, because in Silverlight&#8217;s implementation of .NET&nbsp;these non-generic collection types have been removed completely. The BCL Team Blog <a href=\"http:\/\/blogs.msdn.com\/bclteam\/archive\/2007\/06\/26\/non-generic-collections-to-be-removed-from-silverlight-inbar-gazit.aspx\" target=\"_blank\">has the details<\/a>, together with a handy guide on&nbsp;<a href=\"http:\/\/blogs.msdn.com\/bclteam\/archive\/2007\/06\/25\/bcl-refresher-converting-the-non-generic-collections-inbar-gazit.aspx\" target=\"_blank\">how to convert your non-generic collections<\/a>. Of course you can simulate non-generic collections by declaring collections of type Object, so there&#8217;s no reason to continue using the old collection types.<\/p>\n<div class=\"wlWriterSmartContent\" id=\"0767317B-992E-4b12-91E0-4F059A8CECA8:cfa23152-c593-4e52-8748-5598596013d2\" contenteditable=\"false\" style=\"padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\">Technorati tags: <a href=\"http:\/\/technorati.com\/tags\/.net\" rel=\"tag\">.net<\/a>, <a href=\"http:\/\/technorati.com\/tags\/programming\" rel=\"tag\">programming<\/a>, <a href=\"http:\/\/technorati.com\/tags\/generics\" rel=\"tag\">generics<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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&lt;T&gt; and Dictionary&lt;K,V&gt; which are safer and&nbsp;more efficient. It&#8217;s time to tidy up your code, because in Silverlight&#8217;s implementation of .NET&nbsp;these non-generic collection &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/267-time-to-stop-using-non-generic-collections.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Time to stop using non-generic collections<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,80],"tags":[],"class_list":["post-267","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}