I have a class where I'm implementing a collection of another class...
Public Class ChoreList
Inherits CollectionBase
Default Public Property Item(ByVal index As Integer) As Chore
Get
Return CType(List(index), Chore)
End Get
Set(ByVal Value As Chore)
List(index) = Value
End Set
End Property
End Class
Public Class Chore
Private _name As String
Private _isprimary As Boolean
Public Event MadePrimary()
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal Value As String)
_name = Value
End Set
End Property
Public Property Primary() As Boolean
Get
Return _isprimary
End Get
Set(ByVal Value As Boolean)
_isprimary= Value
If Value = True Then
RaiseEvent MadePrimary()
End If
End Set
End Property
End Chore
What do I need to do to get the ChoreList class to react to the MadePrimary
event in the Chore class? I can't see how to recognize that it even exists.
|