[Solved] System.Linq.Expression.Compile error


Resolved.

The method was called recursively, creating the parameter and the expression and returned to himself. In this process the parameters were removed from memory, as they had already been used believed not to have problems. But they need to be kept in memory until the time of compilation. In this case I used a private variable to store the parameters that have been using thus compiled correctly.

solved System.Linq.Expression.Compile error