C# to VB Online

Whilst .NET provides language interoperability, allowing coders to use the language they’re comfortable with, there are still times, especially when collaborating in groups and teams, that having source code available in different languages can help discussion.

ConvertCSharp2VB is a free web-based tool that converts C# code to VB.NET code in a flash. Simply feed in your C# and receive the VB.NET in return.

Excellent.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • M. Johansson

    too bad it doesnt do it the other way.

  • berra

    For a VB.Net to C# Converter, look here:
    http://www.vbconversions.com/

    Not free, though.

  • Tim

    “…too bad it doesnt do it the other way.”

    C# is really basic to conver to VB (excuse the pun :) ). VB.NET is a real pain in the arse to convert to C#.

  • Einakhan

    this is really greate achievement, iappriciate u. Sir i need some help for u if u can, Sir i want to navigate city maps for RealEstate companies Using VB.Net I tried hard to do this but didn’t find any help. I will grate full to u. Sir I hope you will share with me your tallent. Contact me on einakhan@yahoo.com Please as soon as possible

  • Einakhan

    this is really greate achievement, iappriciate u. Sir i need some help for u if u can, Sir i want to navigate city maps for RealEstate companies Using VB.Net I tried hard to do this but didn’t find any help. I will grate full to u. Sir I hope you will share with me your tallent. Contact me on einakhan@yahoo.com Please as soon as possible

  • Anonymous

    // 1. Send and display the progressbar
    string templateFileName = Path.Combine(Server.MapPath(“.”), “progressbar.htm”);
    StreamReader reader = new StreamReader(@templateFileName);
    string html = reader.ReadToEnd();
    Response.Write(html);
    Response.Flush();

    // 2. Prepare Treatment
    Random R = new Random(); // Used to generate random sleep times
    int currentValue, currentPercent; // used to know progression
    int maxValue = 15; // Number of steps

    // 3. Process Treatment
    for (currentValue = 1; currentValue setPgb(‘pgbMain’, ‘” + currentPercent + “‘); “;
    jsBlock += “addLog(‘logMain’, ‘Processed Step #” + currentValue + ” – Sleep Time = ” + sleepTime.ToString() + “ms’);” + “”;

    // 3.4. Stream out the Javascript
    Response.Write(jsBlock);
    Response.Flush();

  • Anonymous

    public string GetChapters( string filePath )
    {
    // Create an xml document.
    XmlDocument doc = new XmlDocument();

    // Load the XML from the file.
    doc.Load(filePath);

    // Retrieve all categories from the xml.
    XmlNodeList categories = doc.SelectNodes(“DotNetSpider/tutorials/Category”);

    string chapterString = “”;
    int chapter = 0;

    // Iterate through all the categories
    foreach ( XmlNode categoryNode in categories )
    {
    // Add category name to the string.
    chapterString += “

    ” + categoryNode.Attributes["Name"].Value + “
    “;

    // Get all chapters in the current category.
    XmlNodeList chapters = categoryNode.SelectNodes(“Chapter”);

    // Loop through all chapters in the current category and add to the string.
    foreach ( XmlNode chapterNode in chapters )
    {
    ++chapter;

    chapterString += ”

  • Chapter ” + chapter +
    ” : ” +
    chapterNode.Attributes["Name"].Value + “
    “;
    }
    }

    // Return the string, which contains the list of chapters.
    return chapterString;
    }

  • Anonymous

    string constr = ConfigurationSettings.AppSettings["myconnection"];
    SqlConnection sqlConn = new SqlConnection(constr);
    sqlConn.Open();
    SqlCommand cmd = sqlConn.CreateCommand();
    cmd.CommandText = “SELECT ‘Hello World'”;

  • Anonymous

    string constr = ConfigurationSettings.AppSettings["myconnection"];
    SqlConnection sqlConn = new SqlConnection(constr);
    sqlConn.Open();
    SqlCommand cmd = sqlConn.CreateCommand();
    cmd.CommandText = “SELECT ‘Hello World'”;

  • Anonymous

    Button btn = Page.FindControl(“Button” + numWidget) as
    Button;
    btn.Attributes["onmouseover"] = “document.all.” +
    btn.ClientID + “.src = ‘/Images/blue.gif'”;