I wrote it as a vector, because I wanted a vector. :) There were already a few hand-rolled codegen templates out there which emitted classes derived from CollectionBase (basically ArrayList).
But I reckon that if one wants to be type-safe, then one would probably also want to avoid the needless un/boxing overhead for value-types... right? So I hand-rolled my own storage as a resizable T[]. The beauty of X-Code (and its little brother TextBox) is that it's just code: you're free to start where I left off, and build a type-safe hashtable template. In fact, a typesafe hashtable template could probably be made to "wrap" my typesafe vector template, quite nicely... -S On Thu, 11 Apr 2002 09:45:49 +0200, Thomas Tomiczek <t.tomiczek@THONA- CONSULTING.COM> wrote: >WONDERFULL work, Chris :-) > >Just a question - you mention that Shawn Van Ness created the template >for the generic class. > >WHY is this not "inheriting" from an untyped collection? Would it be >possible to modify it in such a way to inherit from any "asked for " >collection? The reason I ask for this is pretty simple - the generic you >have in there right now is basically a Vector. Some people would also >like a typesafe hashtable etc. > >So a generator that takes any existing (well, ok, ANY) classss it is >pointed to and then actually implements all the "typesafe functions" >would be GREAT :-) Maybe by delegation, not by inheritance :-) > >I currantly would love a typesave hashtable, you know :-) > >Regards > >Thomas Tomiczek >THONA Consulting Ltd. >(Microsoft MVP C#/.NET) > > > >-----Original Message----- >From: Chris Sells [mailto:[EMAIL PROTECTED]] >Sent: Donnerstag, 11. April 2002 09:14 >To: [EMAIL PROTECTED] >Subject: [DOTNET] TOOL: .NET CollectionGen: A new design-time code >generator for VS.NET > > >CollectionGen [1] is a Custom Tool Add-In to VS.NET to generate >type-safe collections. CollectionGen is an add-on to generate code for >type-safe collections until we have templates in C# (likely) and VB >(unlikely). Once you've set 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. > >In addition to the type-safe collection generator, I've provided a bit >of explanation and the code so that you can make your own custom tools, >just like the XSD Dataset generator. > >Enjoy! > >Chris Sells >http://www.sellsbrothers.com/ > >[1] http://www.sellsbrothers.com/tools/#collectionGen (this may not be >immediately available, as my cable modem upload speed bites...) > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, >or subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.