How should I convert Java code to C# code?

前端 未结 6 1304
天命终不由人
天命终不由人 2021-01-12 19:43

I\'m porting a Java library to C#. I\'m using Visual Studio 2008, so I don\'t have the discontinued Microsoft Java Language Conversion Assistant program (JLCA).

My a

6条回答
  •  野的像风
    2021-01-12 20:25

    If you have a small amount of code then a line by line conversion is probably the most efficient.

    If you have a large amount of code I would consider:

    1. Looking for a product that does the conversation for you.
    2. Writing a script (Ruby or Perl might be a good candidate) to do the conversion for you - at least the monotonous stuff! It could be a simple search/replace for keyword differences and renaming of files. Gives you more time/fingers to concentrate on the harder stuff.

提交回复
热议问题