473,473 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

GetInvocationList - Where's the multi-cast delgate again?

I think I might be missing something simple/stupid - but I'm trying to get
the delegates that are listed as event handlers for an event from within an
object instance. For example:
Namespace Foo
Public Delegate Sub MyEventHandler(ByVal sender As Object, _
ByVal e As EventArgs)

Public Class MyObject
Public Event MyEvent As MyEventHandler

Public Sub EnumerateEventDelegates()
' ??? What do I call "GetInvocationList" on?
End Sub
End Class
End Namespace

How do I get hold of the multi-cast delegate for the "MyEvent"?
I've had this explained to me in C# terms - but C# defines a field and a
property, and the field is the multi-cast delegate I'm looking for. This
isn't so with VB so I'm a little stuck.

Cheers everyone!

===
Phil
(Auckland | Aotearoa)
Nov 21 '05 #1
2 8412
On 2004-08-15, Phil Jones <ph************@hotmail.com> wrote:
I think I might be missing something simple/stupid -
You know, that phrase could have two meanings...

but I'm trying to get
the delegates that are listed as event handlers for an event from within an
object instance. <snip>
Public Event MyEvent As MyEventHandler <snip>
How do I get hold of the multi-cast delegate for the "MyEvent"?
I've had this explained to me in C# terms - but C# defines a field and a
property, and the field is the multi-cast delegate I'm looking for. This
isn't so with VB so I'm a little stuck.


Dim d() As System.Delegate = MyEventEvent.GetInvocationList()

Unfortunately, AFAIK the only solution really is this stupid, and worse
I'm pretty sure it's undocumented as well. Welcome to VB.Net.

Nov 21 '05 #2
Wow - simple AND stupid. I like it! That it's undocumented is a little
scary.

Thanks for your help David.
===
Phil
(Auckland | Aotearoa)

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Micha³ Wo¼niak | last post by:
Ok, I have a nice iface, I have a (hopefully) good user authentication, I have a DB up-and-running, and I have PHP 4.3.4 (yeah, I know, I will update...). What I need is a logging utility. And...
4
by: Frank Jona | last post by:
Intellisense with C# and a multi-file assembly is not working. With VB.NET it is working. Is there a fix availible? We're using VisualStudio 2003 Regards Frank
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
0
by: Martin Hart - Memory Soft, S.L. | last post by:
Hi: Can someone tell me the event equivalent of the Delegate's GetInvocationList()? I wish to enumerate the handlers of an event, but can't see how to do it. TIA, Martin.
5
by: Shane Story | last post by:
I can seem to get the dimensions of a frame in a multiframe tiff. After selecting activeframe, the Width/Height is still really much larger than the page's actual dimensions. When I split a...
1
by: Lore Leunoeg | last post by:
Hello again. My code adds several EventHandlers to the same Event-Delegate. Thereafter I 'd like to get a list of all the handlers added. I found that events are some kind of multicast...
0
by: Jianwei Sun | last post by:
Hi, everyone, I have a couple of delegates in a chain, and the way I called it is like this: Delegate aoArrayOfDelegates = m_oTestMethods.GetInvocationList(); foreach (TestMethod...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.