views:

182

answers:

6

Hi people,
I have three projects written with VB.NET (2005) and have to convert them to C# code. (I know that i don't need to convert codes of .net languages at all). I have no time to rewrite them, need a tool or script to convert.
Note: they are console applications.

+7  A: 

Reflector lets you inspect compiled assemblies in several different .Net languages. I've known people to cut and paste the output to convert between languages. Apparently it also has an export feature.

Marcelo Cantos
No need to cut an paste, you can directly save the disassembled class. ;)
Bobby
reflector also has an Export option if you right click the assembly. That will spit out the source code to the folder you specify.
gbogumil
Thanks for the tip, folks.
Marcelo Cantos
+2  A: 

Google: VB.NET to C# converter. There are plenty of online conversion tools for this job.

But be aware: not everything is directly translateable between VB.NET and C# (and vice-versa), since some language features are unique.

M.A. Hanin
A: 

google search for it

one I have used

gbogumil
+1  A: 

http://converter.telerik.com/

Slavo
+1  A: 

Another option is using Carlos Aguilar's converter. Converts from VB.NET to C# and viceversa.

Experience shows me that different converters are better than others in certain areas so I'd recommend you to use more than one, if possible, and compare their output.

Narcís Calvet
+1  A: 

SharpDevelop can do this, but depending you your vb.net code a lot of manual work will remain.

Stefan Egli