Results 1 to 6 of 6

Thread: implementing "For Each" for custom class

Threaded View

  1. #3
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    SelfEnum

    Here is my shot at no Collection solution, meaning a two class module solution: the one is for the item and the other is the actual class. SelfCallback is such a wonderful thing to exist!

    The class is very simple, it just has minimal Add, Count and Item properties. All the other code is dedicated for the enumeration effect to have the support for For Each without a Collection.


    Quote Originally Posted by MSDN
    You can't write an enumerator object with Visual Basic
    MSDN is wrong
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width