XCODX |

VB.NET Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About VB.NET

This page runs VB.NET on the modern cross-platform .NET runtime, the same unified platform that succeeded .NET Framework, giving Visual Basic code access to current base class libraries and runtime performance improvements. Microsoft keeps VB.NET supported on modern .NET for console and library workloads, which matters to the large installed base of enterprise VB systems being migrated forward from Framework 4.x. If you are checking how your code behaves on the contemporary runtime rather than Mono, this is the variant to use. Your program executes in a live terminal: compilation output streams first, then the process runs and Console.ReadLine stops to collect the text you type in real time.

Hello World in VB.NET

Imports System.Collections.Generic

Module Program
    Sub Main()
        Console.Write("Enter a temperature in Fahrenheit: ")
        Dim f As Double = Double.Parse(Console.ReadLine())
        Dim c As Double = (f - 32) * 5 / 9
        Console.WriteLine($"{f}F = {c:F1}C")

        Dim scores As New List(Of Integer) From {72, 88, 95, 61}
        scores.Sort()
        Console.WriteLine("Sorted scores: " & String.Join(", ", scores))

        Console.Write("Add another score: ")
        scores.Add(Integer.Parse(Console.ReadLine()))
        Console.WriteLine($"Average is {scores.Average():F2}")
    End Sub
End Module

When to use VB.NET

The .NET-runtime variant matters most to teams migrating legacy Visual Basic applications from .NET Framework to modern .NET, who need to verify that string interpolation, LINQ methods like Average, and collection initializers behave identically on the new platform. It also serves students in courses standardized on current .NET SDKs, and developers comparing Mono versus modern-runtime behavior for the same snippet. Because startup, number formatting, and library surface match today's production .NET, results here reflect what a freshly deployed console app would do.

Common questions

Is input still interactive when running on the .NET runtime?

Yes. The runtime makes no difference to interactivity: the page attaches a live terminal to your process, so Console.ReadLine suspends execution mid-program and resumes with the line you type. You can interleave prompts, parse numbers with Double.Parse or Integer.TryParse, and loop until input validates, just like in a local dotnet run session.

How does this differ from the other VB.NET page?

The plain VB.NET page compiles with the Mono toolchain, while this one targets the modern cross-platform .NET runtime that superseded .NET Framework. For basic console code the results usually match, but newer base class library methods, string interpolation formatting details, and performance characteristics follow current .NET behavior here, making it the better reference for migration checks.

Can I reference NuGet packages or multiple project files?

No. Each run compiles one standalone source file without a project system, so NuGet restore, multi-file solutions, and app configuration files are unavailable. The base class library itself is rich, including generic collections, LINQ extension methods, DateTime, and formatting APIs, so most console-level tasks and coursework run unmodified.

How VB.NET runs on XCODX

Sandbox filename
main.vb
Entry point
main.vb Module Main entrypoint
Editor grammar
vb
Reading stdin
Console.ReadLine()
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

Imports System
Module Program
    Sub Main()
        Console.WriteLine("Hello from BASIC.NET!")
    End Sub
End Module