Vb Class collections

  • Thread starter Thread starter Lou
  • Start date Start date
L

Lou

Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou
 
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's


Just inherit from a collection type.

You surely don't need a wizard to create a collection...?
 
Is there a class wizard like in VB6 to create a collection class?
I have class1 and want a class collection of class1's
-Lou

I use class collections all the time, no need for a wizard to create
them.

Public Class ClassA
Private Property X as int
Private Property Y as int
End Class

Public Class myClass
Public Sub myMethod
Dim myList as new List(of ClassA)
Dim myListMember as ClassA
myListMember = New ClassA
myListMember.X = 123
myListMember.Y = 456
myList.Add(myListMember)
etc ...
End Class
 
I use class collections all the time, no need for a wizard to create
them.

Public Class ClassA
Private Property X as int
Private Property Y as int
End Class

Public Class myClass
Public Sub myMethod
Dim myList as new List(of ClassA)
Dim myListMember as ClassA
myListMember = New ClassA
myListMember.X = 123
myListMember.Y = 456
myList.Add(myListMember)
etc ...
End Class

Didn't get the syntax for the ClassA properties, but you should get
the picture.
 
Back
Top