Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert VB.NET code to C# [closed]

Is there a library that I can use to convert VB.Net code into C#? There is http://codeconverter.sharpdevelop.net/ but i don't want to use it from a web service.

like image 406
Lennie Avatar asked Dec 04 '22 12:12

Lennie


2 Answers

Open your assembly in .NET Reflector. Choose language C#. Copy/paste source code to Visual Studio. Try to compile.

like image 137
abatishchev Avatar answered Dec 18 '22 08:12

abatishchev


There are plenty online services: Telerik provides one, here's one other and one of the best is on developer fusion. But these are all online.

I've had good experiences with Instant C# of Tangible Solutions, they provide good services for each bug you encounter after conversion. Other than that, many others are available through Google.

If you use Reflector, a few notes: it doesn't translate your source code, but the compiled code. This can make a huge difference in logic inside methods and above all, you loose all your (xml) comments and possibly your file structure (partial classes are not recognized, for instance). Reflector is virtually unusable when it comes to ASPX and inline code. But it is an excellent free tool in all other respects

like image 26
Abel Avatar answered Dec 18 '22 07:12

Abel