1

Is there a library which converts arbitrary c# expression trees to string (representing C# source which would build up that expression tree)

var expTree = ...;
var stringRepresentation = Library.ToCSharpSource(expTree); // <- something like this
Console.WriteLine("Debug info: " + stringRepresentation);

I've found this article: Convert an Expression Tree to Source Code string however, the link is not working anymore.

Community
  • 1
  • 1
D.R.
  • 20,268
  • 21
  • 102
  • 205

0 Answers0