Message from discussion
When use a delegate?
From: "Cowboy \(Gregory A. Beamer\)" <NoSpamMgbwo...@comcast.netNoSpamM>
References: <eeT9P31mIHA.4208@TK2MSFTNGP02.phx.gbl>
Subject: Re: When use a delegate?
Date: Thu, 10 Apr 2008 18:11:05 -0500
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
Message-ID: <u95hmA2mIHA.2304@TK2MSFTNGP05.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: c-98-193-193-3.hsd1.tn.comcast.net 98.193.193.3
Path: g2news1.google.com!news2.google.com!news.glorb.com!news2.arglkargh.de!news.karotte.org!newsfeed00.sul.t-online.de!t-online.de!TK2MSFTFEEDS02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP05.phx.gbl
One prime example is events.
Another is when you have to run more than one "function" when a specific
action happens.
Another is when you have a library that has to make a callback to the
calling application, but you do not know what the event name is at the time
you create the library.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss
or just read it:
http://gregorybeamer.spaces.live.com/
*************************************************
| Think outside the box!
|
*************************************************
"Cirene" <cir...@nowhere.com> wrote in message
news:eeT9P31mIHA.4208@TK2MSFTNGP02.phx.gbl...
> When would you choose to use a delegate rather than calling a function
> directly? What's the advantages? Thanks...
>