Why does LambdaExpression.Compile() work on iOS (Xamarin)?

后端 未结 2 1776
梦如初夏
梦如初夏 2021-02-13 13:44

Since Xamarin.iOS doesn\'t support code generation at runtime, why do Compile() and DynamicInvoke() work as expected?

For example, the following code works fine:

2条回答
  •  爱一瞬间的悲伤
    2021-02-13 13:45

    On platforms that support code generation, Reflection.Emit-based LambdaCompiler is used.

    If that's not available, the expression is interpreted using the interpreter. For example, there are classes that interpret Constant and Add.

提交回复
热议问题