Determine the assembly where a delegate resides
-
Hi all. This is a bit of a weird question, but I actually need to determine what assembly a delegate's definition resides in. That is, if an instance of a delegate is passed-into my class, I need to determine where the code that that delegate represents comes from. Any thoughts?
“Time and space can be a bitch.” –Gushie, Quantum Leap {o,o}.oO( Looking for a great RSS reader? Try FeedBeast! ) |)””’) Built with home-grown CodeProject components! -”-”-
-
Hi all. This is a bit of a weird question, but I actually need to determine what assembly a delegate's definition resides in. That is, if an instance of a delegate is passed-into my class, I need to determine where the code that that delegate represents comes from. Any thoughts?
“Time and space can be a bitch.” –Gushie, Quantum Leap {o,o}.oO( Looking for a great RSS reader? Try FeedBeast! ) |)””’) Built with home-grown CodeProject components! -”-”-
Ah, looks like I can do it with: theDelegate.Method.Module.Assembly; That wasn't so hard as I was expecting. ;)
“Time and space can be a bitch.” –Gushie, Quantum Leap {o,o}.oO( Looking for a great RSS reader? Try FeedBeast! ) |)””’) Built with home-grown CodeProject components! -”-”-
-
Ah, looks like I can do it with: theDelegate.Method.Module.Assembly; That wasn't so hard as I was expecting. ;)
“Time and space can be a bitch.” –Gushie, Quantum Leap {o,o}.oO( Looking for a great RSS reader? Try FeedBeast! ) |)””’) Built with home-grown CodeProject components! -”-”-
Ah nice one !