将Assmebler代码包含在CSharp中??? [英] Including Assmebler code into CSharp???

查看:75
本文介绍了将Assmebler代码包含在CSharp中???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能将汇编程序代码包含在CSharp中?

如果是,有人可以举个例子吗?


Joe

Is it possible to include assembler code into CSharp?
If yes, could someone give me an example?

Joe

推荐答案

Joe DeAngelo< de ******* @ nortel.com>写道:
Joe DeAngelo <de*******@nortel.com> wrote:
是否有可能将汇编程序代码包含在CSharp中?
如果是,有人可以举个例子吗?
Is it possible to include assembler code into CSharp?
If yes, could someone give me an example?




不,这是不可能的。


-

Jon Skeet - < sk *** @ pobox.com>
< a rel =nofollowhref =http://www.pobox.com/~skeettarget =_ blank> http://www.pobox.com/~skeet

如果回复小组,请不要给我发邮件



No, it''s not possible.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


我很确定你不能这样做。 CSharp编译成中间语言(IL)+元数据。从那里运行时,IL被编译成机器特定的代码。编写汇编代码会破坏这个链。但是,您可以在C#代码中执行其他程序。因此,如果您可以将汇编代码编译成可执行文件,那么您应该可以从C#代码中运行它。


查看方法''System.Diagnostics.Process.Start''


HTH


" Joe DeAngelo"写道:
I''m fairly sure you can''t do that. CSharp compiles into intermediate language (IL) + Metadata. From there at runtime the IL is compiled into machine specific code. Writing assembler code would break this chain. You can however, execute other programs from within your C# code. So if you could compile the Assembly code into an executable you should be able to run that from your C# code.

Check out the method ''System.Diagnostics.Process.Start''

HTH

"Joe DeAngelo" wrote:
是否有可能将汇编程序代码包含在CSharp中?
如果是,有人可以给我一个例子吗?

Joe
Is it possible to include assembler code into CSharp?
If yes, could someone give me an example?

Joe



Ryan Riddell< Ry ********* @ discussion.microsoft.com>写道:
Ryan Riddell <Ry*********@discussions.microsoft.com> wrote:
我很确定你不能这样做。 CSharp编译成中间语言(IL)+元数据。从那里运行时,IL被编译成机器特定的代码。编写汇编代码会破坏这个链。但是,您可以在C#
代码中执行其他程序。因此,如果您可以将汇编代码编译成可执行文件,那么您应该可以从C#代码中运行它。
I''m fairly sure you can''t do that. CSharp compiles into intermediate
language (IL) + Metadata. From there at runtime the IL is compiled
into machine specific code. Writing assembler code would break this
chain. You can however, execute other programs from within your C#
code. So if you could compile the Assembly code into an executable
you should be able to run that from your C# code.




偶尔会有用的是能够在C#代码中包含ILASM

- 但你不能这样做:(


-

Jon Skeet - < sk *** @ pobox.com>
http: //www.pobox.com/~skeet

如果回复小组,请不要给我发邮件



What would occasionally be useful would be the ability to include ILASM
in C# code - but you can''t do that, either :(

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


这篇关于将Assmebler代码包含在CSharp中???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆