Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you include C++ snippets in C#?

Tags:

c++

c#

.net-4.0

Can I include sections of code written in Visual C++ in my C# app, or vise-versa? I know that you can do that in Objective-C, so I wanted to know if it was possible in C# (.NET 4.0).

like image 506
Code Creator Avatar asked Dec 20 '25 15:12

Code Creator


1 Answers

Sort of. You can't include them directly in C#, but you can use C# and C++/CLI together, and most C++ can also be compiled as C++/CLI.

like image 105
Jerry Coffin Avatar answered Dec 23 '25 16:12

Jerry Coffin