It is possible using the C++/CLI. This is a managed version of C++ that is used with . NET.
I won’t go into too much detail because you probably don’t want to use it. In fact it is usually only used as glue between native C# and C++ applications. That is, you will do the main part of the application in C#, and use the C++/CLI to give C# access to native C++ written functions.
Of course it is possible to use the C++ code in C++/CLI. It is not pure C++ but it is very similar in almost everything. But it’s almost certain to require some adaptations.
Avoid doing this, but there’s a possibility. If you are going to switch to C# think carefully if there is any reason to leave a part in C++, usually you do not need, you will only create complications without having any benefit.
This is to do, if you submit all the actions of the form by Web Service, but, I do not advise doing this. Maybe, there is someone there who knows another alternative, but I think it doesn’t exist, because C++ uses a compiler and C# uses another.
– Diego Moreno
this would be a brave and needless gambit, if it will migrate to a language more parruda, it would not be much easier to adapt the syntax of the functions to C#, the logic would remain the same.
– Paulo Roberto
I’d say stay in the C++.
– ptkato
The problem is that I have more than 5 thousand lines ready, I would like to put a visual to the program, without needing the wx extension....
– Estevão
It depends a little on how your code is, but one option is to turn the C++ part into a DLL, which you can use in the program written in C# (which would be in charge of the interface elements and their Event handlers).
– bfavaretto
I get it, you could explain to me better how I do it??
– Estevão
@Stephen Take a look at [tour]. You can accept an answer if it solved your problem. You can vote for every post on the site as well. Did any help you more? You need something to be improved?
– Maniero