dynamic keyword problem

前端 未结 4 562
无人共我
无人共我 2020-12-03 18:29

pls tell me in which version dynamic keyword is introduced ? I found strange behavior in VS2010. I set target framework to 3.5. But there is no compiler error. just crate a

4条回答
  •  星月不相逢
    2020-12-03 18:44

    The dynamic type was introduced in .Net 4.0.

    The dynamic type is not a language only feature (i.e purely supported by the compiler). It relies on the DLR which is a .Net 4.0 feature which needs library support.

    You cannot use dynamic and target the .Net 3.5 framework.

提交回复
热议问题