Article View: borland.public.csharpbuilder.language.csharp
Article #235event versus simple delegate
From: Francois PIETTE [ICS - MidWare]
Date: Sat, 29 Jul 2006 15:23
Date: Sat, 29 Jul 2006 15:23
20 lines
1879 bytes
1879 bytes
I'm proting Delphi code to C#. Delphi use unicast events while C# use multicast events. No problem. I have a set of Delphi classes which for some operation communicates only between them using Delphi events. Porting to C#, I can create C# events corresponding to Delphi events. But those C# events will of course be unicast only. So I ask myself if it is not better to use a simple delegate instead of an event. A simple delegate is much like a Delphi event and is enough for the code I'm porting and is probably much faster. I would use C# events only for the Delphi events exposed to the outside world which of course may need C# multicast events. Any advice appreciated. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- francois.piette@overbyte.be The author for the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be
Technical Details
Message-ID:
<44cb7da5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,62beb5b391211bf0,start X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Francois PIETTE [ICS - MidWare]" <francois.piette@overbyte.be> Newsgroups: borland.public.csharpbuilder.language.csharp Subject: event versus simple delegate Date: Sat, 29 Jul 2006 17:23:08 +0200 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 81.244.49.158 Message-ID: <44cb7da5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1154186661 81.244.49.158 (29 Jul 2006 08:24:21 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!border1.nntp.ams.giganews.com!nntp.giganews.com!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail