什么是之间的托管C ++和C#的区别是什么?区别

2023-09-03 07:16:25 作者:我家宝贝

我看用的,而不是C#C ++的主要优点是编译为本机code,所以我们获得更好的性能。 C#是比较容易的,但编译为管理code。

The major advantage I see for using C++ instead of C# is compiling to native code, so we get better performance. C# is easier, but compiles to managed code.

为什么会有人使用托管C ++的呢?它给我们带来什么好处呢?

Why would anyone use managed C++ for? What advantages it gives us?

推荐答案

托管C ++和C ++ / CLI让您可以轻松地编写托管code,与本地C ++进行交互。

Managed C++ and C++/CLI allow you to easily write managed code that interacts with native C++.

迁移现有的系统时,.Net和科学与环境必须在C ++中运行计算时,这是非常有用的。

This is especially useful when migrating an existing system to .Net and when working in scientific contexts with calculations that must be run in C++.