Create delegate from MethodInfo

  • Thread starter Thread starter Stan Huff
  • Start date Start date
S

Stan Huff

How do instantiate a delegate given a MethodInfo and possibly and object
instance (for non-static methods)? My delegates only take a function
pointer in the constructor.

Thanks,
Stan
 
Does Delegate.CreateDelegate give you what you need? You don't say how much you know about the delegate type you want or the target object type.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

How do instantiate a delegate given a MethodInfo and possibly and object
instance (for non-static methods)? My delegates only take a function
pointer in the constructor.

Thanks,
Stan
 
That is just what I was looking for!

Thanks,

Stan


Richard Blewett said:
Does Delegate.CreateDelegate give you what you need? You don't say how
much you know about the delegate type you want or the target object type.
 
Back
Top