How I pass a delegate prototype to a method?

Posted by Jeff Dahmer on Stack Overflow See other posts from Stack Overflow or by Jeff Dahmer
Published on 2010-03-31T22:42:00Z Indexed on 2010/03/31 23:13 UTC
Read the original article Hit count: 294

Filed under:
|
|

SO lets say in my class I have:

public delegate bool MyFunc(int param);

How can I then do this

someObj.PassMeADelegateToExamine(this.MyFunc); // not possible!?!

SO that I can examine the delegate and perhaps use reflection or something idk to find out it's return type and any params it might have?

Basically if I can transform it into an (uncallable) Action object that woul dbe grand

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET