将 java 转换为 c# .net

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1900913/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 18:26:49  来源:igfitidea点击:

Convert java to c# .net

c#java

提问by Buddhi

Possible Duplicate:
Tool to convert java to c# code

可能的重复:
将 java 转换为 c# 代码的工具

I have done a project in java and I want to convert it to C#.Net. I'm using Visual Studio 2008. How can I convert the code from Java to C#? Are there any tools available?

我在java中做了一个项目,我想把它转换成C#.Net。我使用的是 Visual Studio 2008。如何将代码从 Java 转换为 C#?有没有可用的工具?

回答by Iain

There are tools that can help do this. For example this one from the team who created db4o:

有一些工具可以帮助做到这一点。例如来自创建 db4o 的团队的这个:

Smart java to c# conversion for the masses with sharpen

智能 java 到 c# 转换为大众提供锐化

Note that these are not perfect and some constructs and API's cannot be easily translated.

请注意,这些并不完美,有些结构和 API 无法轻松翻译。

回答by Pablo Santa Cruz

I think your best shot would be, unless you really reallyneed all the code in C#, to use Visual J#and integrate your Java code with C#.

我认为你最好的选择是,除非你真的需要 C# 中的所有代码,否则使用Visual J#并将你的 Java 代码与 C# 集成。

回答by Gordon

Here is an Msdn Articleabout converting from Java to Visual C#.

这是一篇关于从 Java 转换为 Visual C#的Msdn 文章

回答by Kico Lobo

Microsoft used to support their own .net implementation of the Java language, called Java#, but unfortunetelly they discontinued the project.

Microsoft 过去支持他们自己的 Java 语言的 .net 实现,称为 Java#,但不幸的是他们停止了该项目。

But at least you could try it to see if it could help you to convert your code to .net

但至少您可以尝试一下,看看它是否可以帮助您将代码转换为 .net