C# Dynamic Keyword — Run-time penalty?

后端 未结 6 1218
春和景丽
春和景丽 2020-12-01 14:20

Does defining an instance as dynamic in C# mean:

  1. The compiler does not perform compile-time type checking, but run-time checking takes place like it always

6条回答
  •  不知归路
    2020-12-01 15:27

    As far i undesrtand dynamic it only bypasses compile time check. resolution of type happens at runtime as it does for all types. so i dont think there is any performance penalty associated with it.

提交回复
热议问题