Possible Duplicate:
To开发者_如何学编程ol to convert java to c# code
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?
There are tools that can help do this. For example this one from the team who created db4o:
Smart java to c# conversion for the masses with sharpen
Note that these are not perfect and some constructs and API's cannot be easily translated.
IKVM.NET Bytecode Compiler
Here is an Msdn Article about converting from Java to Visual C#.
I think your best shot would be, unless you really really need all the code in C#, to use Visual J# and integrate your Java code with C#.
Microsoft used to support their own .net implementation of the Java language, called Java#, but unfortunetelly they discontinued the project.
But at least you could try it to see if it could help you to convert your code to .net
精彩评论