How to determine which methods are called in a method?

前端 未结 3 2004
长情又很酷
长情又很酷 2020-12-31 22:08

I\'d like to list all the methods that are called from a specific method. E.g. if I have the following code:

public void test1() {

   test2();


   test3();         


        
3条回答
  •  星月不相逢
    2020-12-31 22:34

    you can use .NET Reflector tool if you want to pay. you could also take a look at this .NET Method Dependencies it gets tricky though, as you're going to be going into the IL. A third possible would be to use the macro engine in VS, it does have a facility to analyze code,CodeElement, I'm not sure if it can do dependencies though.

提交回复
热议问题