CodeSmith Community
Your Code. Your Way. Faster!

VBTypedCollection

Latest post 12-24-2004 8:10 PM by Geoff. 2 replies.
  • 06-05-2003 10:04 PM

    • jbrinkman
    • Not Ranked
    • Joined on 06-05-2003
    • Posts 1
    • Points 65

    VBTypedCollection

    This is a VBTypedCollection based on CollectionBase.  It is derived from the CSharpTypedCollection
    • Post Points: 65
  • 08-23-2003 12:22 AM In reply to

    • kenlefeb
    • Top 500 Contributor
    • Joined on 08-23-2003
    • Central Pennsylvania, United States
    • Posts 14
    • Points 315

    RE: VBTypedCollection

    Thanks for the great start! ;)
     
    I tweaked the ToArray() method which raised compiler errors for me (doesn't like initializing a typed array without including the braces, even if you're not populating the array).
     
    I also made the Namespace optional, because VB concatenates the Namespace statement to the root namespace specified in the Project property sheet, so if you want the collection generated to be in the project's root namespace, you have to omit the Namespace declaration.
     
    This was my first use of CodeSmith and I LOVE IT! This is a great way to code faster!
     
    • Post Points: 5
  • 12-24-2004 8:10 PM In reply to

    • Geoff
    • Not Ranked
    • Joined on 11-04-2004
    • NYC
    • Posts 4
    • Points 50

    RE: VBTypedCollection

    Which is the best collection to use in VB.net..... this one or the VBVector that comes with codesmith??
     
    One thing i noticed is that the VBVector Collection does not enforce a strongly typed "add" method...you can attempt to add any item type without a compiler warning - it's not untill runtime that an exception is thrown??
     
    The collection from this thread raises an error when attempting to add an incoimpatible type as i would expect.
     
    Are the synchronization features and the generic implementation (circumventing collectionbase) of the VbVector collection useful??  IS the VBVector collection more adaptable for interop or serialization because it is based directly on a regular array instead of arraylist??
     
    Why does'nt VBVector inherit from CollectionBase?
     
    Why would i choose on over the other??
     
    Any help would be most appreciated.
     
    most importantly...Happy Holidays!!!
    • Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems