C ++ with C #, is it possible?

7

I have a C ++ project using visuals in it using wxWidgets.

I was wanting to transfer the design look to C #.

Is it possible to have the programming of the functions in C ++, but the programming of the whole visual in C #, that is, the buttons call the functions in C ++?

    
asked by anonymous 17.06.2015 / 19:23

1 answer

6

It is possible using the C ++ / CLI . This is a managed version of C ++ that is used with .Net.

I will not go into too many details because you probably will not want to use it. In fact it is only usually used as a glue between native C # and C ++ applications. That is, you are going to do the main part of the C # application, and will use that from C ++ / CLI to give access to C # to functions written in native C ++.

Of course you can use the code in C ++ in C ++ / CLI. It's not pure C ++ but it's pretty much the same in almost everything. But it is likely to require some adaptations.

Avoid doing this but there is a possibility. If it is going to be passed to C #, think about whether there is any reason to leave a part in C ++. Usually do not have to. You will only create complications without having any benefit.

    
07.07.2015 / 04:39