Nesting Events

Results 1 to 2 of 2

Thread: Nesting Events

  1. #1
    Join Date
    Dec 1969

    Default Nesting Events

    Hi people,<BR><BR>I suppose this is more of a design question but I&#039;m making the move to C# and maybe there are language specifics that might make this easier to implement (or tidier anyway).<BR><BR>I have a class called ParentClass which holds a reference to a custom collection. For example.<BR><BR>public class ParentClass<BR>{<BR> MyCollectionType _col;<BR><BR> // etc<BR>}<BR><BR>The collection type raise an event which I can handle in the instance of parent class. My question is, if I want to &#039;bubble&#039; this event up a level should I just handle the event raised from the collection and then raise a new event declared at the ParentClass level, or is there a better way to achieve this.<BR><BR>Many Thanks in advance<BR>Simon Rigby

  2. #2
    Join Date
    Dec 1969

    Default RE: Nesting Events

    MSDN&#039;s got some really good infomation on bubbling events in .Net. Here&#039;s how&#039;s it&#039;s done by any class deriving from System.Web.UI.Contol. <BR><BR><BR>Hopefully it&#039;ll give you some ideas for your classes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts