C++ in C#
-
hello i want to write C++ code within C# how can i do this? thanks in advance
-
hello i want to write C++ code within C# how can i do this? thanks in advance
You can't. You can use C# to call into C++ assemblies though.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
hello i want to write C++ code within C# how can i do this? thanks in advance
You can't. You could write a dll in C++ and use it from C#, but you can't directly write c++ within a C# assembly.
Simon
-
hello i want to write C++ code within C# how can i do this? thanks in advance
THe only way you can mix managed (like C#, VB.net, etc) and unmanaged (like normal c++) code in a single file is to use C++/CLI. This will let you use normal c++ and "c++.net". Unfortunately the resulting syntax is rather heavier than either normal C++ or C# code. As a result it's not generally recommended. Instead the preferred options are to either use p/invoke to call a c++ dll from within C# code, or to create a Managed COM object in C#, and use COM to call it from within C++ code.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
hello i want to write C++ code within C# how can i do this? thanks in advance
Thanks davey, simon and dan you were extremely helpful ;) i think i'll use p/invoke thanks again