473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 8409
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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,...
0
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...

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.