title: How do I find what methods are called from a C# class method - NOT at run time
body: <p>I have a C# class that has far too much code in, and I want to <code>refactor</code> it. What I would like to do is start with all the <code>public methods</code>, and build a <code>tree</code> for each one, showing which other methods in the class are called from it, and then which are called from the child one, and so on.</p>
  
  <p>This will enable me to see which <code>private methods</code> belong solely to one <code>public method</code>, which are shared and so on.</p>
  
  <p>Note that I DON'T want to do this at run time, I want to be able to look at a class, either directly at the <code>.cs file</code>, or using reflection on the compiled <code>DLL</code>.</p>
  
  <p>I know I can use reflection on the compiled DLL to get the methods, but I can't find any way of finding out which methods are called by other methods in the class.</p>
  
  <p>Anyone any ideas? Again, this is NOT a run time issue, it's purely to build a reusable utility to help refactor an oversized class. There are quite a few in the solution I'm working on, so the code woudl be used over and over again.</p>