Visual studio List of method names in the class

I know about a drop-down list that shows all the methods among many other things in the class, but I am making a flowchart, and for this I need a list , as in the text of all methods in the class. How can I get this list because currently I will manually copy the method names to a list that is as troublesome as I have 600ish methods ...

+3
source share
3 answers

Use the Refactor Visual Studio menu and select "Extract Interface." Refactor-> Extract Interface in MSDN for Visual Studio 2008 .

enter image description here

" " "". . enter image description here

, .

enter image description here

.

+5

, , .., .

, , , :

// get all public static methods of MyClass type
MethodInfo[] methodInfos = typeof(MyClass).GetMethods(BindingFlags.Public |
                                                      BindingFlags.Static);
// sort methods by name
Array.Sort(methodInfos,
        delegate(MethodInfo methodInfo1, MethodInfo methodInfo2)
        { return methodInfo1.Name.CompareTo(methodInfo2.Name); });

// write method names
foreach (MethodInfo methodInfo in methodInfos)
{
  Console.WriteLine(methodInfo.Name);
}

- , , , .

, . , , .

+1

It's extremely late for a party, but this is a way to not mess with the code.

  • Use a Disassmbly tool, such as Telerik JustDecompile .
  • Locate and open the assembly containing your code.
  • Go to type, select disassembly in the text box.
  • To do this, use a text editor, for example Notepad ++ , to format / clear the text.
0
source

All Articles