I am new to VB2010 and am trying to figure out how to implement a collection class within an another class. For example, I have a Widget class and want to create 5 of them. These will be added to a Widgets class.
Here is the basic code that I have so far:
Simple class to instantiate a Widget and add it to the collection.
Public Class Widget
Private mstrName As String
Public Property Name As String
Name = mstrName
Set(ByVal value As String)
mstrName = value
Public Sub New(ByVal strName As String)
Me.Name = strName
'What code is needed to to add a new Widget to the collection?
Here is the code for the Widgets collection.
Public Class Widgets
View Complete Post