Click here to Skip to main content
15,666,947 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Updated 27-Jul-12 18:39pm
Kenneth Haugland 28-Jul-12 0:40am    
create a dll or library of the C file and load it in a C# program?
[no name] 28-Jul-12 0:43am    
Or rewrite the C program in C#

1 solution

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#.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900