参考 Using Unmanaged code and assembler in C# 23 Sep 2001 This article describes how to call unmanaged code and assembler in C# using DLLs
http://www.codeproject.com/csharp/unmanage.asp
你只有用C/C++,或Delphi等内嵌汇编,编译成DLL供C#调用。
Using Unmanaged code and assembler in C# 23 Sep 2001 This article describes how to call unmanaged code and assembler in C# using DLLs http://www.codeproject.com/csharp/unmanage.asp
你要知道,.net的程序不是被直接运行的,简单的说.net的程序实际上只是一种作者意图的表述,当然这种表述是供.net虚拟机识别的,.net虚拟机根据这些表述翻译成适合本地的汇编代码然后运行。
如果你非要用汇编,可以把要实现的模块用DLL封装,在C#里通过非托管代码调用这个DLL,但是这也不能带来效率的提高,甚至往往会降低效率。执行器在托管代码和非托管代码之间频繁转换,系统开销是惊人的
Using Unmanaged code and assembler in C#
23 Sep 2001
This article describes how to call unmanaged code and assembler in C# using DLLs
http://www.codeproject.com/csharp/unmanage.asp
23 Sep 2001
This article describes how to call unmanaged code and assembler in C# using DLLs http://www.codeproject.com/csharp/unmanage.asp