在同一个应用程序中使用C#和C ++ [英] Using C# and C++ in the same application
问题描述
可能关注的对象:
我正在学习C#.NET语言。 这是一个基于用户并且是可视的。 我喜欢的功能。 我想知道的是你可以将C#.NET与C ++接口。 为什么... C ++是使用最广泛的软件,我希望源代码的
可移植性。 C#用户友好,适用于互联网和电脑屏幕。 我想知道这是怎么做的。 你可以帮忙。
I am learning the C#.NET language. This is a user based and is visual. That feature I like. What I would like to know is can you interface C#.NET with C++. Why...C++ is the most widely used software and I would like portability of the source code. C# is user friendly and lends itself to the internet and computer screens. I would like to know how this is done. Can you help.
Dylan T. Rogers
Dylan T. Rogers
推荐答案
是的,可以制作C#/ .Net  ; C ++应用程序的用户界面。
yes it is possible to make a C#/.Net user interface for an C++ application.
您可以例如调用接口来自C#应用程序的C ++ DLL的方法。
You can e.g. call the interface methodes from a C++ DLL from a C# application.
执行此操作的一种可能性是使用编组。
One possibility to do this is using marshalling.
但请记住,如果你一起使用C ++和C#,你就会失去pur C#应用程序的一些可能性,例如:喜欢它的平台可移植性(x86 / x64)。
But keep in mind if you use C++ and C# together you loose some of the possibilities of a pur C# application e.g. like its platform portability (x86 / x64).
问候,
David
这篇关于在同一个应用程序中使用C#和C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!