If C# is not interpreted, then why is a VM needed?

后端 未结 3 1666
我在风中等你
我在风中等你 2020-12-30 14:07

I have read a lot of controversy about C#, where some say it\'s interpreted, some say it\'s not. I do know it\'s compiled into the MSIL and then JITed when run, depending on

3条回答
  •  长发绾君心
    2020-12-30 14:54

    The short answer is no, the requirement for the VM does not indicate that it's interpreted.

    The VM contains the JIT compiler that translates IL to native machine code. It also contains the .NET class library, upon which C# programs depend. It also contains some other mechanisms involved in dynamic linking and such (definitely built on top of Windows DLL mechanism, but .NET has features above and beyond what Windows provides on its own, which are implemented in the VM).

提交回复
热议问题