|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
C# to VB Conversion Help - Overriding Events?Is this possible in VB.NET? /// <summary> /// We manually implement delegate management, so instead of /// declaring event variable we declare accessor methods /// </summary> public override event BroadcastedMessageHandler NewBroadcastedMessage { add { PersistentEventsHelper.AddEventSink (value,c_NewBroadcastedMessageEvent); } remove { PersistentEventsHelper.RemoveEventSink (value,c_NewBroadcastedMessageEvent); } }
Show quote
Hide quote
"Spam Catcher" <spamhoneypot@rogers.com> schrieb: Yes, it's possible in VB 2005 (not in previous version!). Check out 'Custom > Is this possible in VB.NET? > > /// <summary> > /// We manually implement delegate management, so instead of > /// declaring event variable we declare accessor methods > /// </summary> > public override event BroadcastedMessageHandler > NewBroadcastedMessage > { > add > { > PersistentEventsHelper.AddEventSink > (value,c_NewBroadcastedMessageEvent); > } > > remove > { > PersistentEventsHelper.RemoveEventSink > (value,c_NewBroadcastedMessageEvent); > } > } Event'. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in That's what I thought - couldn't find anything for .NET 1.1.news:#ON8cRY4GHA.4820@TK2MSFTNGP06.phx.gbl: > Yes, it's possible in VB 2005 (not in previous version!). Check out > 'Custom Event'. In the end, rewrote the call as 2 sub (add/remove)... works just as well.
Securing my app with serial number
Whats the right approach for getting a job Challenging PRoblem in VB.NET. Encrypt a date to use in demo version System.Diagnostics.Process.Start Freezes No Recursive instr?!! Problem with mutex Do I need to install Excel on the server? RTf to Word.Doc Design Question |
|||||||||||||||||||||||