For example, this:
int i = 5;
Expression<Func<long>> expr = () => (long)i;
Console.WriteLine(expr.ToString("C#"));
produces this:
when the following:
is also valid. Even though the precise return type is now elided, but having the conversion may obscure other parts of the structure of the tree.
For example, this:
produces this:
when the following:
is also valid. Even though the precise return type is now elided, but having the conversion may obscure other parts of the structure of the tree.