Compiling C# to Native?

后端 未结 11 1385
醉酒成梦
醉酒成梦 2020-12-12 10:26

I think I\'m somewhat confused about compiling .NET byte-code to native code, or maybe I\'m confused about the end result. So please bear with me as I try to sort through w

11条回答
  •  生来不讨喜
    2020-12-12 11:06

    If you want to protect your code, an obfuscator is the typical approach. Dotfuscator has been in an arms race with reflector for a while and we use it on our products. In practice, however, a skilled human can easily read obfuscated code.

    Compiling to native code defeats the purpose of having a managed language. The main benefit is to allow the target runtime to JIT the IL into something that is optimally palatable for the target CPU. If you want otherwise, you would use something like the ahead-of-time option in mono.

提交回复
热议问题