Convert C# to VB.net

can anyone point me in a direction on how to convert a project that is written in C# to VB.net

Answer this question

Convert C# to VB.net

  • Saurabh_Mathur

    Hi,

    As pointed out, there are a few differences between C# and VB.net. There are a few web pages that will attempt to do the conversion for you. Here is one:

    http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx



  • Michael_Giagnocavo

    I'm not really sure if there is a tool that does this at once. Reflector can help you since it can show you the code within a .NET assembly in both C# and VB.

    REMARK: When converting from VB.NET to C#, you need to know the differences between them. There are some minor differences that can cause your code to work differently.

    For example:
    When you declare an array in VB.NET like this: Dim values(10) As Integer you get an array with 11 elements starting from index 0 to index 10.

    When you declare the array in C# like this: int [] values = new int[10]; you get an array with 10 elements starting from index 0 to index 9.

    Greetz,

    Geert

    Geert Verhoeven
    Consultant @ Ausy Belgium

    My Personal Blog



  • Convert C# to VB.net