Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to convert a code from VB to C#?

if you have a code for an application or a website, and want to convert and use it or edit it in C# language...!!

user-image
Question ajoutée par Mohamad Al Asmar , Senior Software Engineer , Aqeed
Date de publication: 2013/09/02
Hamid Anjum
par Hamid Anjum , Team Lead \ Sr. Software Engineer , University of Business and Technology, Jeddah

Top5 coversion based websites are listed below

 

1) http://converter.telerik.com/

2) http://www.developerfusion.com/tools/convert/vb-to-csharp/

3) http://www.carlosag.net/tools/codetranslator/

4) http://codeconverter.sharpdevelop.net/SnippetConverter.aspx

5) https://www.varycode.com/converter.html

rajesh dhiman
par rajesh dhiman , Software Engineer , smartdata enterprises, mohali

There are a lot of conversion tool available on the internet.

One of them is

http://www.developerfusion.com/tools/convert/vb-to-csharp/ an online tool to convert vb code to c#.

Hope this would help you.

Thanks.

Amen Ayach
par Amen Ayach , .Net Team Leader, Project Coordinator and Senior Solution Designer , Netways
Dileep DK
par Dileep DK , Head of Engineering – Consumer Finance , DBS Bank Ltd.

My sincere request is to do this manually. Using a convertor you end up doing more work on code cleanup and logic corrections. If the source solution is simple then you can convert it chunk by chunk using tools mentioned earlier.

Here are some hints that might help you decide the best route to take.

VB projects that use OLE automation are mostly unusable when converted to C#

 If you have VB forms that use OLE objects,3rd party objects and datagrids then you have to rewrite it using .Net components.

VB code with many GOTO's or On Error are not readable in converted C# and mostly end up with Syntax errors.

You will miss out on object oriented nature of C# whereas most code I have seen in VB are functionally separated modules.

On the plus side

You will get an overall structure of the solution including most of the UI, using convertors. This can serve as a basis to build your project.Complex mathematical logic are easily done

Maher Alsilwy
par Maher Alsilwy , CONSULTANT , B7R DESIGN WWW.B7RDES.COM

Yep, as what  "rajesh dhiman" said. use a conversion tool. :)

Bilal Hassan
par Bilal Hassan , Principal Software Engineer | Full Stack Developer , TEO International & IE, Islamabad

Simple....

there are hell of software that can convert VB.Net to C#.Net but there is one ONE big problem and that is automated code generated by tool will need to verify its working because tool can not identify business logic of ur coding and point if thinking.

:)

shakeel mir
par shakeel mir , Senior Software Developer , Rawat-Al-Makan

http://www.developerfusion.com/tools/convert/vb-to-csharp/ an online tool to convert vb code to c#.

webiste is best for convert code from Vb.net to C # or C# to Vb.net

Eslam Gamal
par Eslam Gamal , MIS Executive - Credit Risk , QIB

if you mean vb.NET you can simple convert a whole solution using sharpdevelop 

C# > vb.net and vise versa

Muzaffar ShahKhan
par Muzaffar ShahKhan , AX Functional Consultant , MNC-Manufacturing

Dear, 

In real you cannot100% transfer from VB6 to C#, though tools are available but again you need to lot of handy work to convert completely.

If it is VB.net to C#.net then it is100% possible.

Fawad Fawad
par Fawad Fawad , Assistant Manager R&D , Creative Electronics And Automation Pvt Ltd

There are alot of website which can covert your VB Code into C.

Just like

 

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

Hasan Habib
par Hasan Habib , Digital Transformation Specialist , Tritech

there are many online converter available. But none of is perfect. Some are good and some have some limitation on complex code. here is a link

http://visualstudiogallery.msdn.microsoft.com/cc8da841-f978-4c3e-8397-c820bd57298c

It works on vs2010/vs2012

More Questions Like This