PC Review


Reply
Thread Tools Rate Thread

CollectionBase and events

 
 
Random
Guest
Posts: n/a
 
      20th May 2005
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML and collectionbase Mark Winters Microsoft C# .NET 3 17th Jun 2011 08:33 AM
Using CollectionBase Juan Martinez Microsoft C# .NET 2 27th Apr 2006 05:20 PM
CollectionBase BUG??? SharpCoderMP Microsoft C# .NET 3 1st Sep 2005 09:58 PM
CollectionBase =?Utf-8?B?Sm9zZW1h?= Microsoft C# .NET 1 26th Apr 2005 02:21 AM
Collectionbase with key Kejpa Microsoft VB .NET 4 5th Nov 2004 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.