dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Object List in VB6

  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Object List in VB6

    Hi ,
    I need to use a object list we can use this in C# like List<ClassType> . How can ı use this in vb6. Itried to use Arrays but it needs to array size defined. Every time when i will add an item to it it needs the last index. But in C# i only use listObj.Add(...) . Please help me how can i handle it?

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Object List in VB6

    Try a collection
    Code:
    Dim ObjectList as New Collection
    Dim op as Object
    Set op = New ObjectOfAnyKind 
    ObjectList.Add op [, "KeyForThisObject"]
    You can add any object and even define an optional Key (that's what I put in square brackkets)

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)