Click here to Skip to main content
15,916,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...

I am just working out on Reflection in C#, I have jst learned how to invoke methods in dll using reflection . Now i want to know that using this concept and Stacktrace combinely can we retrieve the reference of that invoked method(i.e all the method names in this dll which called the invoked method).

i know that in general we can use Stack trace class to get reference in class file....

But how can we get the reference of the methods in a dll....

any reference pls....
pls help me out......
Posted

1 solution

First of all, the reflection can achieve the information from the metadata in the assembly. I don't think we can get the relationship between the members from that.

Secondly, the stack trace means how the method would be called from the beginning, such as Main->Method1->Method2. However, the thing you are looking for is not stack trace. E.g. for Method1, Method3 may call Method2. But you cannot get this from stack trace.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900