FAQ for C# to Java Converter
Q: Is the original C# project altered in any way?
Your existing code is left completely intact. The new Java files are written to the new location that you specify.
Q: What is the conversion accuracy?
Our accuracy is the highest in the industry, but there will be significant adjustments required for all but the most trivial conversions. There are no direct equivalents for some aspects of C#. Read the rest of the FAQ to get an idea of a few things that are not converted. C# to Java Converter is intended to reduce the amount of work you'll have to do to convert C# code to Java, but it is just the first step.
Q: Are C# delegates converted?
Yes - try out our demo to see the conversion details. We convert delegate declarations to interface declarations and references to delegate instances to anonymous inner classes.
Q: Are C# ref parameters converted?
Yes - try out our demo to see the conversion details. We substitute a wrapper type (using Java generics) for the parameter type and adjust all references to the parameter in the defining method and all calls to the method.
Q: What are the most common adjustments necessary after conversion?
Most .NET Framework calls are not converted. However, many references to the .NET String, Char, Hashtable, Dictionary, ArrayList, List, Stack, Queue, StrringBuilder, Array, Math, Convert, Console, and MessageBox classes are converted to Java.
There are no simple equivalents to C# events in Java, so these must be refactored.
Since Java lacks a preprocessor, all code dependent on conditional compilation needs to be refactored so that the functionality can be achieved in other ways. If your target environment is NetBeans, then no adjustments are required since C# to Java Converter converts preprocessor directives to NetBeans format by default (using //#if, //#else, //#elif, //#endif, //#define, and //#undefine).
C# LINQ queries are not converted since this feature is not available in Java.
C# 'struct' is converted to Java 'class', since Java does not include value types. The Java class does not reproduce the same behavior as .NET value types, so adjustments may be required.
C# 'unsafe’ blocks cannot be fully converted since Java has no corresponding concept. These are marked with 'ToDo' comments.
C# nullable logic cannot be converted since the necessary null-value logic must be applied to every aspect of expressions containing the nullable variable or method call. The only aspect of nullable instances that is converted is the declared type - the corresponding Java wrapper type is used for nullable primitives (e.g., the Java wrapper type 'Integer' is used for C# int? or Nullable<int>).