Re: how to wrap your brain around delegates?
- From: "Joanna Carter [TeamB]" <joanna@xxxxxxxxxxxx>
- Date: Wed, 14 Jun 2006 15:13:40 +0100
"Peter Morris [Droopy eyes software]" <pete@xxxxxxxxxxxxxxxxxxxxxx> a écrit
dans le message de news: 44900b2f@xxxxxxxxxxxxxxxxxxxxxxxxx
| I'm experiencing one of those "Nah, I don't get it" scenarios :-)
Basically :
public class Base
{
protected Dictionary<string, EventHandler> events = new Dictionary<string,
EventHandler>();
}
public class Derived : Base
{
public void OnClick()
{
if (events.ContainsKey("Click"))
{
EventArgs args = EventArgs.Empty;
events["Click"](args);
}
}
}
I know this is not exact, but does it give you the idea ?
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
.
- References:
- how to wrap your brain around delegates?
- From: Bryce K. Nielsen
- Re: how to wrap your brain around delegates?
- From: Joanna Carter [TeamB]
- Re: how to wrap your brain around delegates?
- From: Peter Morris [Droopy eyes software]
- Re: how to wrap your brain around delegates?
- From: Jon Shemitz
- Re: how to wrap your brain around delegates?
- From: Ray Konopka
- Re: how to wrap your brain around delegates?
- From: Peter Morris [Droopy eyes software]
- Re: how to wrap your brain around delegates?
- From: Barry Kelly
- Re: how to wrap your brain around delegates?
- From: Peter Morris [Droopy eyes software]
- Re: how to wrap your brain around delegates?
- From: Ray Konopka
- Re: how to wrap your brain around delegates?
- From: Peter Morris [Droopy eyes software]
- how to wrap your brain around delegates?
- Prev by Date: Re: those intrested in wince/pocketpc/smartphone development
- Next by Date: Re: those intrested in wince/pocketpc/smartphone development
- Previous by thread: Re: how to wrap your brain around delegates?
- Next by thread: Re: how to wrap your brain around delegates?
- Index(es):
Relevant Pages
|