开发者

Pinvoke vs ManagedCode

I was wondering which is better translating a C++ code to C# or Pinvoking it from C# app

which would be better in terms of performa开发者_如何学Gonce and memory and other


If you are running on Windows the third option (the one missing from your list) is best. Leave the code in C++ and compile it with C++/CLI. Then your C# code can consume it directly without need for P/invoke or translation.


There's a good description of how to do this on MSDN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜