C# <-> VB.NET Conversion

As all the sample code I have written is in C# a common question I receive in the newsgroup is how to convert this C# code to VB.NET.

Here is a list of tools which allow to do this:

C# to VB.NET conversion:

http://www.carlosag.net/Tools/CodeTranslator/Default.aspx
http://www.aspalliance.com/aldotnet/examples/translate.aspx
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
http://www.ragingsmurf.com/vbcsharpconverter.aspx

If someone needs conversion from VB.NET to C# I found the following tools:

http://www.carlosag.net/Tools/CodeTranslator/Default.aspx
http://w1.311.telia.com/~u31115556/desc/programs.htm#BabbelFisken
http://www.codeproject.com/csharp/GBVB.asp

This tool allows both conversion:

2 Comments


  1. You can add the following C# to VbNet free conversion tool: http://www.codechanger.com/

    It is the only one I know which can deal with ++. Try the following:

    ———————–

    using System;

    public class MyClass

    {

       static void Main(string[] args)

       {

          if(++mcount < Count)

                     Console.WriteLine("Hello !");

       }

       int mcount;

       public int Count

       {

       get

         {

          return mcount++;

          }

        }

    }

    ——————-

    and observe the VbNet you get for the if test and for the returned get property, with the other tools.

    Reply

Leave a Reply to Dave Crook Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.