Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reflection and method usages

Tags:

c#

reflection

I have class A and class B in diferent assemblies, what I need to know is if there is a way to get the usages of the method A.foo() in class B's methods via reflection. I've read that maybe with IL?

Thanks for the help.

like image 855
Ariel Avatar asked Aug 29 '26 00:08

Ariel


1 Answers

No, you cannot do this with reflection. Reflection is based on the metadata of objects; the public APIs they expose. Their internal implementations are not accessible at all through reflection.

like image 183
Servy Avatar answered Aug 30 '26 13:08

Servy