Skip to content
DanielGrunwald edited this page Sep 8, 2009 · 1 revision

There are two versions of our code converter:

Online code converter

The online version of the code converter is available at http://codeconverter.sharpdevelop.net/.

The online converter is great for converting small code snippets, especially if you don't have SharpDevelop installed. However, it has a disadvantage: It cannot look at the assemblies you referenced (or even at other files of the same project), so it does not have accurate type information. As you will see, in some cases incorrect or missing type information can cause the converter to introduce subtle bugs in the converted code.

Offline code converter

The offline code converter is built into the SharpDevelop IDE. Because you open your solution in the IDE, the converter can access all type information.

Also, the offline converter is able to convert whole projects at once. All source files in the project will be converted; other files will be copied over. For the VB to C# conversion, the project converter adds C# code to emulate the VB My namespace.

Note that the offline converter is running locally on your machine; it's not calling the web service provided with the online converter. Your code never leaves your machine.

Implementation

The code converter is implemented in the libraries ICSharpCode.NRefactory and ICSharpCode.SharpDevelop.Dom. NRefactory is used for the translation; and SharpDevelop.Dom is used as type system to guide the converter in the cases where it's difficult to preserve the semantics of the program.

Clone this wiki locally