.NET CollectionGen
Wed, 4/10/02
[Note:.. As of 5/5/03, the functionality of CollectionGen has been sucked into Eric Smith's CodeSmith I asked Eric to take on these features because CodeSmith does all of what CollectionGen does and more All new feature requests / bug reports should Go his way.]
CollectionGen is a Custom Tool Add-In to VS.NET 2002 & 2003 to generate type-safe collections. As it turns out, I did almost none of the work. Jon Flanders figured out how to add a custom tool. Shawn Van Ness implemented The Template for Type-Safe Collections. I Just Put It Together.
CollectionGen is an add-on to generate code for type-safe collections until we have templates in C # (likely) and VB (unlikely). The benefit of a type-safe collection, of course, is that you can use it without having to Cast items to and from objects. Also, Shawn Has Been VERY CAREFUL TO IMPLEMENT A Collection Class That Is Very Efficient for Both Reference Types and Value Types.
ONCE You'VE Setup IT Up and Defined your collections in a Collection Definition File In Your Project, You'll Have Type-Safe Collection Classes Generated AS Part of Your Design-Process, As Shown Here:
Figure 1: Collections.xml Collection Definition File
Figure 2: collections.xml and generated collect.cs importation file
Figure 3: Collectiongen Custom Tool Add-in Associated with The Collections.xml File
Figure 4: Generate Type-Safe Collection Code
Enjoy!
Also, Atif Aziz Used Some of My Custom Tool Code and Built a Generic vs.Net Code Generator Shim That Allows You To Build A Code Generator That Plugs Into Vs.Net by Implementing A Single Method.