473,396 Members | 1,766 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,396 software developers and data experts.

How can I check if a methdo adhere to a particual delegate in runtime?

Hi folks,

Im writing a small GUI application to deploy objects that allows a
user to create my objects, set it's properties, serialize it into a
binary package for futher load into production enviroment.
Among those "properties", the GUI allows a user to create delegates
at runtime and bind it to the object's events.
Hoever I'could see a way to check which methdos from some class
adhere to same delegate declaration with the EventInfo and MethodInfo
classes. Right now what I'm doing is trying to create a delegate for
each method of the objects, inside a try/catch block, which is an
elegant way, IMHO.
How could I do this check in runtime? By the way I also couldn't
figure out how can I get the invocation list (and for consequence
the're respective MethodInfo) from an EventInfo. I saw some posts
pointing out way to it using FieldInfo, and the casting it, but this
doesn't work always (don't aske me why). I really can't belive that we
have all those features and information trought the runtime, but are'nt
allowed to get them "connected".

Cheers,

Eric.

Nov 16 '05 #1
0 1001

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

Similar topics

13
by: José Joye | last post by:
The example at the end make me perplex... Looking at the msdn documentation, the inheritance tree that relates to "delegate" is as follow: Object<--Delegate<--MulticastDelegate. Unless I'm...
10
by: John Bowman | last post by:
Hello, I need some help getting a callback delegate passed as an argument to a dynamically linked Dll method so it in turn, can eventually call it. Below is the salient portions of code I'm...
4
by: jiangyh | last post by:
hi there: I have a question about how to transfer the construct methdo of the base class. thanks a lot. jiangyh
15
by: Sharon | last post by:
I’m trying to build a generic Publisher-Subscriber that will work over the net, so I’m using the Remoting. I wish that the subscriber user will be notify about the messages sent by the...
11
by: ZorpiedoMan | last post by:
This is either a bad bug, or I'm not understanding somthing. In my mind, this should NOT work: ------------------------------------------ Class ShouldntWork Delegate Sub goHere() Sub...
0
by: Nate | last post by:
I am creating an application that is quite complex. There will be several dozen objects, most of which have delegates defined. At runtime, there will be several hundred instances of some objects...
4
by: ^MisterJingo^ | last post by:
Hi all, I've been trying to get my head around delegates. The book i'm using had a single example, not much explaination, and didn't show how to set up a delegate and pass variables in and out...
3
by: Jeff S | last post by:
Please consider this sample code: It registers a delegate with an event. p1.FirstNameChanged += new Person.NameChanged(p1_FirstNameChanged); Now the following code removes the delegate:...
5
by: needin4mation | last post by:
Learning about delegates (again, I admit), I think I finally get it, maybe. I can reference any method in any class in the same namespace as long as it has the same signature. Right? But how...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.