Show/Hide Toolbars

XSharp

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.

 

To correct this error

 

1.Change the anonymous method to a lambda expression.

Example

 

The following example generates XS1946:

 

 

// XS1946.prg