This example shows how to list the method invocations in a C# file. This is the file that will be read: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { public class MyClass { public MyClass() { Console.WriteLine(“Hello.”); DoSomething(); DoSomethingElse(); } private void DoSomething() { } private void DoSomethingElse() { } } } To install CodeSearchTree in your Visual Studio project, type Install-Package CodeSearchTree in the package manager console. Your project must use .NET Framework 4.6 or higher. The path to the first method invocation is ns/cls/constructor/block/expression/invocation, but since each invocation is located under an expression node, we will iterate through those. The code will list the three calls made in the constructor of the example class above. //Load[…]

For this example, I am using Visual Studio 2015 Community edition to create a console application.  Make sure that you are using .NET Framework 4.6 or later. Let’s say that you have a .cs file with constants that looks something like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MySystem { public class Settings { public const int Iterations = 56; public const string TargetFilename = @”C:\Output\log.txt”; public const int Length = 128; public const bool Repeat = true; } } You want to know the names and values in this file. Let’s start from the beginning. In my console application, I want a reference to the CodeSearchTree – I accept your complements for my choice of[…]