制作结合c和c#代码的软件 [英] make a software combining c and c# code

查看:71
本文介绍了制作结合c和c#代码的软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了两个程序.一个在C中,另一个在C#中.现在,我想制作一个结合了这些C#和C程序的软件.我该怎么做?
谢谢

I wrote two programs. one is in C and other one is in C#. Now i want to make a software combine these c# and C programs. How can i do it?
Thank you

推荐答案

不可能. C不是OO,C#强制OO作为开始.如果您说的是C ++和C#,则可以使C ++代码成为C ++/CLI,并将一组代码放入dll.否则,您可以构建一个C dll,然后使用p/invoke对其进行调用.但是您不能拥有一个使用C和C#甚至C ++和C#的项目.
Not possible. C is not OO, and C# forces OO, for a start. If you said C++ and C#, then you could make your C++ code C++/CLI and put one set of code in a dll. Otherwise, you could build a C dll, and call it using p/invoke. But you can''t have one project with C and C#, or even C++ and C#.


这篇关于制作结合c和c#代码的软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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