Porting C ++ to C #

C ++ and C # are pretty nice programming languages, in my opinion. If C ++ code needs to be ported to a platform where C # is the only supported platform, how much work will need to be done?

Do I have to prepare for most of the C ++ code to be rewritten in C #? Or, due to differences in language, does refactoring need to be fairly simple and straightforward?

I know that this will depend on the application itself, but I ask in general.

+3
source share
5 answers

I recently made a large port of a C ++ application for C #. All in all, I thought it was a pleasant experience. These are the steps that I took, they may or may not apply to your application.

  • Get "scaffolding" in place in C #, design your architecture. It is time to get significant architectural changes from an existing application if you decide to do so.
  • . . , , . #. , - ( ) , . .
  • - #, ++. #, - .
  • . , ++ - , . , , , .., #.
  • , , / , , , ++, #. .., , VS 2010.
  • ! , , , , ++, . .
  • , , . , , , ++. . , .
+17

, , . , .

, ( ) ++ #, , , . , , ++ C- , .

, , , . , , , , , .

+6

++ /clr. IL, .NET- . ++, , , __fastcall.

, , . , .NET . , . Native ++, IL, - . , .

+3

, # " ".

, - . , , : , . , , . . .

.NET ++, Visual Studio Visual ++ ++, , .

0

++ # , , # -. - . , , , , , .

, - , , # , .

-1

Source: https://habr.com/ru/post/1769978/


All Articles