Sharing the information you need to get development done!
Welcome to DevAuthority.Com Sign in | Join | Help
in Search

Confessions of a Webgypsy

Have you heard the one about Generics?

OK, so the title of this blog is Confessions of a Webgypsy and as far as I can tell I really haven’t made any confessions up to this point.  So as a matter of complying with any truth in advertising clauses, I have decided to issue a confession as today’s post.  I have been excited about the upcoming release of VS2005 but have been so busy with the tasks I currently have that I haven’t been able to spend any time researching the new features.  I keep hearing all this buzz about this cool new concept called Generics, but I had NO IDEA what it was all about.  I actually had a little bit of free time this week and stumbled across a link for a free book introducing the new features for VB.NET.

So what is generics?

Well for a “generic” short answer it’s essentially a new set of collection classes.  The advantage to these are that these are type-safe and strongly typed so that you can have a collection of objects and reference them with a Key value of a type of your choosing.  This also gives you the ability to use good-old intellisense when accessing the properties of objects stored in one of these collections. 

Yes, I know this happens to be a REALLY short, OVERLY broad answer to the question, but I just want to give others with the lack of knowledge about this cool feature a quick glimpse of what we have to look forward to.  If you want more information, go to the link I listed above and read the introduction. 

Published Friday, August 19, 2005 7:26 AM by dbalzer
Filed Under:

Comments

 

Oliver Sturm said:

Your answer is not only short and broad, it's really wrong as well. While collection classes are one area of the .net framework 2 where Generics have been used extensively by Microsoft, Generics themselves don't have anything at all to do with collection classes.

I once wrote an article "What are Generics good for, anyway?", which tries to explain the real use of Generics with a small sample (which doesn't happen to be a collection class :-)). If you are interested, find it here: http://www.sturmnet.org/blog/archives/2005/03/08/generics1/
August 20, 2005 6:32 AM
Anonymous comments are disabled







This Blog

Post Calendar

<August 2005>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
28293031123
45678910

Syndication



Powered by Community Server, by Telligent Systems