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:

Comments (2)

  1. Dave Crook says:

    If you’re interested in converting VB.Net to C#, check out http://www.vbconversions.net. It converts whole projects from VB.Net to C#.

  2. vanderghast says:

    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.

Skip to main content