且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将C#代码更改为二进制代码

更新时间:2023-02-07 23:16:24

你不用C#编写二进制代码 - 你可以编写IL代码并将其嵌入C#: https://visualstudiogallery.msdn.microsoft.com/44034a7b-143d-4b51-b7bc-99aa656ba137 [ ^ ],但这是你可以去的,因为最终的二进制版本没有产生直到代码运行并且JIT编译器得到它的手。



为什么,为什么,你为什么要写入二进制呢?我一直在那里,不是那样,拿到了T恤。现代语言的一个主要优点是你不必再做了!这是缓慢,困难和维护问题。
You don't write binary code in C# - you can write IL code and embed that in you C#: https://visualstudiogallery.msdn.microsoft.com/44034a7b-143d-4b51-b7bc-99aa656ba137[^], but that's about as far as you can go, as the final "binary" version isn't produced until the code is run and the JIT compiler gets it's hands on it.

And why, oh why would you want to "write in binary" anyway? I've been there, don't that, got the T shirt. And one of the major advantages of modern languages is that you don't have to do it again! It's slow, difficult and a maintenance headache.