Code Conversion tools
I'm back at work, writing VB.Net code again. As I blogged before, I'm currently assigned to a project where I need to develop software in VB.Net. And with a background in C#, it can be pretty annoying at times. I could write the code blindfolded in C#, but in VB.Net I still have to look for examples. But there's help in the way of some cool tools. So in this post, I will some up some options to convert code from one language to another.
SharpDevelop
SharpDevelop is an open-source IDE for building .Net applications. One of the built-in features is a conversion tool which allows you to convert code from C# to VB.Net and vice-versa. It's pretty good in converting. I use it extensively when I want to convert entire classes.
Scott Swigart Visual Studio Add-In
I recently found this article by Scott Swigart and the add-in he describes is actually quite good for my current situation. The add-in allows you to copy (or type) C# code in a text editor. Clicking a button simply adds the code as VB.Net code into your current project. The tool uses public webservices to perform it's task. It also comes with the source code, so it should be possible to add other services, or convert code from VB.Net to C#.
Carlos Aguilar Mares's AJAX-powered code converter
Yep, you read this right. An AJAX-powered website that converts code from C# to VB.Net and vice-versa. Have a look, it works really well. You can type the code and it's converted as you type. It's not that fast (yet), probably because of all the postbacks for everything you type.
Reflector
Reflector has an option that will convert the MSIL found in the assembly to C# or VB.Net. This option can be useful if you have a compiled assembly and not the code it self. But it's not fool proof, and when a tool like Dotfuscator is used, it isn't always a big help.