Convert Java to C# with a tool, or manually?
I would personally do it manually. You can reflect on where the Java design choices simply aren't appropriate for .NET, and end up with idiomatic C# code instead of code which looks very much like C# with a Java accent.
It also means you're more likely to understand the code at the end :)
Java to C# code converter
The below links might help:
- Microsoft Launches Java-to-C# Converter;
- Tangible Software Solutions inc..
Where can I find a Java to C# converter?
Java Language Conversion Assistant. Optionally installed with (at least) Visual Studio 2005 Standard Edition.
Select File/Open/Convert/Java Language Conversion Assistant.
Remember to manually go over the code afterwards. It will have lots of issues.
How should I convert Java code to C# code?
Your doing it in the only sane way you can...the biggest help will be this document from Dare Obasanjo that lists the differences between the two languages:
http://www.25hoursaday.com/CsharpVsJava.html
BTW, change all getter and setter methods into properties...No need to have the C# library function just the same as the java library unless you are going for perfect interface compatibility.
Convert java to c# .net
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.
Looking for the Code Converter which converts C# to Java
Disclaimer: No tool is perfect.
However, if you still want to try then there are these converters available:
- CS2J
- JCLA : Convert Java-language code to C#
- Grasshopper
- CSharpJavaMerger
- Tangible Software C# to Java Converter
Not a converter but a bridge between .NET and the JVM:
- JNI4NetBridge
Related Topics
Why Have One Jvm Per Application
Javamail with Gmail: 535-5.7.1 Username and Password Not Accepted
What Is the Benefit of Polymorphism Using Collection Interface to Create Arraylist Object
Null-Safe Mapping Comparator Using Default Implementations
Java Creating a New Objectinputstream Blocks
Reading a Binary Input Stream into a Single Byte Array in Java
Write a File in Utf-8 Using Filewriter (Java)
Java's Virtual MAChine's Endianness
"No Match Found" When Using Matcher's Group Method
Java/Jaxb: Unmarshall Xml to Specific Subclass Based on an Attribute
Matrix Multiplication in Apache Spark
How to Serialize Object to CSV File
Jersey 2.X Custom Injection Annotation with Attributes
How to Change the Default Application Icon in Java
Converting Date-String to a Different Format
How to Analyze Information from a Java Core Dump
How to Use Selenium Webdriver on Local Webpage (On My Pc) Instead of One Located Somewhere Online