An anonymous method expression cannot be converted to an expression tree.
An anonymous method represents a set of statements but an expression tree must not contain a statement. Therefore an anonymous method cannot be represented by an expression tree.
1.Change the anonymous method to a lambda expression.
The following example generates XS1946:
// XS1946.prg