An expression tree may not contain a call or invocation that uses optional arguments

前端 未结 2 998
忘了有多久
忘了有多久 2020-11-30 03:53

An expression tree may not contain a call or invocation that uses optional arguments

return this.RedirectToAction

        
2条回答
  •  时光取名叫无心
    2020-11-30 04:19

    The underlying expression tree API does not support optional arguments.

    For IL-compiled code the C# compiler inserts the default values at compile time (hard-coded), because the CLR does not support calling methods with optional arguments either when the arguments are not provided explicitly.

提交回复
热议问题