c++ code on C# project
-
Hello, Can I write a c++ code on my c# project? I mean if I have an array (a) on c# and I want to make something with this array but on c++ code how can I do that? I mean How can I mix the two languages togather?
SnaidiS(Semion)
Semion_N wrote:
Can I write a c++ code on my c# project
No. A project can only be written in a single language, be it C++, C#, VB.NET, ... But, there's nothing stopping you from having multiple projects in your Solution, each written in a seperate language.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
Hello, Can I write a c++ code on my c# project? I mean if I have an array (a) on c# and I want to make something with this array but on c++ code how can I do that? I mean How can I mix the two languages togather?
SnaidiS(Semion)
You can mix languages in a solution, just write your C++ code in a C++/CLI dll and call it from C#.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
Hello, Can I write a c++ code on my c# project? I mean if I have an array (a) on c# and I want to make something with this array but on c++ code how can I do that? I mean How can I mix the two languages togather?
SnaidiS(Semion)
This is how I understood it (and I recall I once did a small but successful test combining C#, VB.NET and J#): You can create a dll in one .NET language, and another dll or exe in another .NET language. for each of these you need a project (that is possible in a single solution). Now the second project can call on the dll from the first project, and they can exchange all "CLR types" which covers most of the data types in a .NET language (I think the biggest limitation is on VB.NET, not sure tho). :)
Luc Pattyn
-
Hello, Can I write a c++ code on my c# project? I mean if I have an array (a) on c# and I want to make something with this array but on c++ code how can I do that? I mean How can I mix the two languages togather?
SnaidiS(Semion)