<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Strongly Typed Collections</title><link>http://blogs.msdn.com/asanto/archive/2003/06/24/9201.aspx</link><description>Martin Fowler writes about strongly typed collections , and concludes: "On the whole, however, it isn't worth the trouble " I must admit that I disagree. In anything but the smallest of projects it is both unconvenient and unhealthy to use untyped collections.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Dare Obasanjo</title><link>http://blogs.msdn.com/asanto/archive/2003/06/24/9201.aspx#17473</link><pubDate>Tue, 24 Jun 2003 18:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:17473</guid><dc:creator>kpako@yahoo.com (Dare Obasanjo)</dc:creator><description>I disagree with your argument. First of all cut the petulant Java vs. C# stuff. C# and Java work the same way with collections now and by the time the next version of C# ships with generics the next version of Java will also be shipping with generics if Sun and Microsoft's timelines are to be believed. 
&lt;br&gt;

&lt;br&gt;
Secondly, I've never heard of anyone whose code blew up because an Employee class accidentally ended up in a hashtable or list that was only supposed to contain Automobile classes (for example). </description></item><item><title>re: Strongly Typed Collections</title><link>http://blogs.msdn.com/asanto/archive/2003/06/24/9201.aspx#17475</link><pubDate>Tue, 24 Jun 2003 18:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:17475</guid><dc:creator>Addy Santo</dc:creator><description>I agree that type safety isn't the main issue. For me the issues are convenience (=intellisense in the IDE) and maintainability. Anything which is not explicitly designed to appear only once in the app won't appear twice - it will appear hundreds of times. And when the time comes (usually at 2am just before the release), do you *really* want to start replacing all those hard coded typecasting statements?  Is it really so much trouble to add in those 20-30 lines of code to create a typed collection?
&lt;br&gt;
And why should I have to put up with ugly code such as this:  (in VB.NET just to maximize the pain)
&lt;br&gt;

&lt;br&gt;
CType(CType(MyParentObjects(i),ParentObject).ChildObjects(j),ChildObject).myProperty
&lt;br&gt;

&lt;br&gt;
instead of plain &amp;amp; simple:
&lt;br&gt;

&lt;br&gt;
MyParentObjects(i).ChildObjects(j).myProperty
&lt;br&gt;

&lt;br&gt;

&lt;br&gt;
Now, what doesn't make sense about that?
&lt;br&gt;

&lt;br&gt;

&lt;br&gt;
</description></item><item><title>re: Strongly Typed Collections</title><link>http://blogs.msdn.com/asanto/archive/2003/06/24/9201.aspx#17528</link><pubDate>Wed, 25 Jun 2003 08:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:17528</guid><dc:creator>Adam Kinney</dc:creator><description>I vote for &amp;quot;definitley worth the time&amp;quot;, and along those lines a Typed Dataset is very useful, too.
&lt;br&gt;

&lt;br&gt;
</description></item><item><title>C# Strongly Typed Collections</title><link>http://blogs.msdn.com/asanto/archive/2003/06/24/9201.aspx#232624</link><pubDate>Wed, 22 Sep 2004 04:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:232624</guid><dc:creator>Mikel Berger</dc:creator><description>I've never used strongly typed collections before but for a little side learning project I decided to. It was really simple and the benefit of type safety seemed to be worth it. But it's not really that big of a gain in the whole scheme of things. So while I thought I was missing out on something big, it's really not that big of a deal and should be even more of a mute point once we have generics. Anywhere, here are few references just in case I decide to revisit this in the future. http://www.samspublishing.com/articles/article.asp?p=27578 http://builder.com.com/5100-6373-1050004.html http://www.ondotnet.com/pub/a/dotnet/2003/03/10/collections.html And a little debate on the topic http://weblogs.asp.net/asanto/archive/2003/06/24/9201.aspx...</description></item></channel></rss>