ToString on Expression Trees produces badly formatted output
问题 When I use Expression.ToString() to convert an Expression Tree into human readable form, the result is something like this: x => ((x.ID > 2) OrElse (x.ID != 6)) x => ((x.ID > 2) AndAlso (x.ID != 6)) Ideally, I would want the output to show the operators instead of "OrElse" and "AndAlso": x => ((x.ID > 2) || (x.ID != 6)) x => ((x.ID > 2) && (x.ID != 6)) As a workaround, I could use the string.Replace() method.. .Replace("AndAlso", "&&") .Replace("OrElse", "||") but that has obvious weaknesses