Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody!

I need to find a program that allows me to C# code to VB.Net code and from VB.Net code to C#.
Has anybody got an idea what to use?

Thanks in advance!
Posted
Updated 21-Aug-11 3:08am
v5

This is one that I use but be aware that the conversion is not always 100% accurate

VB tp C# and C# to VB[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Aug-11 13:23pm    
My 5.
--SA
Simon_Whale 21-Aug-11 13:56pm    
Thanks SA :)
Manfred Rudolf Bihy 22-Aug-11 4:23am    
My 5 too! :)
Simon_Whale 22-Aug-11 4:37am    
Thanks Manfred :)
http://www.vbconversions.net[^]
It work for me without error. But I tried only a few projects. It allows to convert entire project from VB.NET to C#.
[Edit]
Caveat: Commercial product! 15 days trial!!!
[/Edit]
 
Share this answer
 
v5
Comments
Manfred Rudolf Bihy 22-Aug-11 4:23am    
Good find! 5+
Аslam Iqbal 22-Aug-11 10:21am    
Thanks
Manfred Rudolf Bihy 22-Aug-11 4:25am    
Please don't link directly to the setup file. Any seasoned user will want to have some information about what she/he'll install on her/his system first. I'll fix that for you :)
Аslam Iqbal 22-Aug-11 10:21am    
Thanks.
check this out:

http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]

it will serve your purpose

hope it helps :)
 
Share this answer
 
The free SharpDevelop IDE has a built-in conversion utility.
 
Share this answer
 
There are several web-based applications for doing this. Google is your friend.
 
Share this answer
 
I know this used to be a free tool, but the devils at redgate are now charging for Reflector[^]. Maybe you can still find an old version out there and see if still fits your needs. With Reflector you can disassemble a .NET dll or exe back to source code. So for your translation process, let's say VB.NET -> C#, you would compile the VB.NET project and then disassemble that into C#. For C# -> VB.NET you'd first build the C# project and then disassebmle that into VB.Net Done!

Caveat: The link I posted in this solution points to a commercial product. I don't advise you to use it, as I abhor people making money out of former open/free solutions. If you need this professionally it might still be a viable solution for you. Especially since smallest available version would already be fit for your needs.

Best regards,

—MRB
 
Share this answer
 
v4
Comments
walterhevedeich 21-Aug-11 21:01pm    
IL Spy is a free alternative to Reflector.
Manfred Rudolf Bihy 22-Aug-11 2:52am    
Thanks Walter, I'll take a look at that. I used to love Reflector that's why my first thought went to it. :)
walterhevedeich 22-Aug-11 2:56am    
Yes it was really a good tool, except that it was not free anymore. I was disappointed too when Red Gate made that move.
Simple Basics.
When you are declaring Variables:
VB: dim num as double
C#: double num;

don't forget the semicolons for every end of statements. :D
 
Share this answer
 
Use reflector to convert the P-Code to either VB or C#. It works great on non-obfuscated code (and because you have the source, the build won't be obfuscated)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900