ExpressionToString icon indicating copy to clipboard operation
ExpressionToString copied to clipboard

Superfluous parentheses

Open AlexArchive opened this issue 10 years ago • 0 comments

Consider the following expression:

Expression<Func<string, bool>> func = text => text == "Hello";
var result = ExpressionStringBuilder.ToString(func);

It produces the following result:

(text) => (text == "Hello")

Notice how my original expression contains no such parentheses.

I will look into a solution if you want but I suspect this will be hard. I wonder what Mono CSharpWriter does (#4).

AlexArchive avatar Mar 17 '15 12:03 AlexArchive