recreating a VB6 class in VB.net

WellsCarrie

Well-known member
Joined
Jul 12, 2005
Messages
95
Location
Arkansas
Programming Experience
5-10
Ok I think the reason I can't find the naswer to this on the web is because I'm not asking google the right question. So I'm going to ask here and hopefully someone can tell me where the answer is. :)

My task is to upgrade a VB6 program to VB.net. Mainly because no one here knows what it is doing. That being said. the VB6 developer created the following class:

VB.NET:
Public ContainerID      As Long
Public ContainerNumber  As String

Literaly that is it. He called it "Container.cls"

Now in the main form's code he creates a colection of this class. He adds shipping contianers to it when ever a new shipping container # is found in the dataset.

My question is... How do I do the same thing in .Net. I tried just creating the class like he did (only the 2 public variables). But .net won't let me create a collection of the class. Am I trying the wrong thing?

IF you need to see more of the old code I'm willing. I just didn't want to post all of.
 
In VB.Net use the ArrayList (Objects) instead of VB6 Collection (Variants).
 
Back
Top