How can I use reflection in C# to find all the members of a class that meet the requirements of a specific delegate? -


I have a class that has got a bunch of public methods, and I want to reflect on it to find it Member set of methods that can be used as a specific representative.

For example:

  representative zero interesting function (int i); Class unit {public zero F (); Public zero (g); Public zero-h (int i); Public Zero X (int i); }  

Can I use Type.FindMembers () to remove set {H, X}? if so, how? Is there a better way?

There is no built-in query support, which will be available on any type of basis The code will need to provide a search method, which snatches through methods and properties and manually compares the signature of the proposed representatives.

This is a non-comparable operation, as you have to take the generic account with your solution.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -