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.
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.
Modern .NET is Microsoft's open-source, cross-platform reinvention of the framework, and it consistently ranks among the fastest mainstream web stacks in TechEmpower benchmarks. Stack Overflow runs on it; so do services at Microsoft, UPS, and thousands of enterprises across the US and UK. Recent versions embraced brevity — top-level statements let a program begin without a class or Main declaration — while records, raw string literals, and primary constructors arrive on an annual release cadence. On this page your C# executes on the modern .NET runtime rather than legacy Mono, attached to a live terminal where Console.ReadLine() waits for input while the program is genuinely running.
// Top-level statements: no class or Main() required on modern .NET
Console.Write("How many Fibonacci numbers? ");
int count = int.Parse(Console.ReadLine() ?? "0");
long a = 0, b = 1;
for (int i = 0; i < count; i++)
{
Console.Write($"{a} ");
(a, b) = (b, a + b);
}
Console.WriteLine();
Console.WriteLine($"Printed {count} terms. The next would be {a}.");
Try the newest C# language features — tuple deconstruction, switch expressions, records with with-expressions, nullable reference types — the moment you read about them, without spinning up a Visual Studio solution. Developers preparing for .NET-stack interviews at enterprises and consultancies can rehearse algorithm questions in the same runtime their employer ships on, and students in university courses that standardized on cross-platform .NET can run assignments from any Chromebook or library machine. It's equally useful for settling small questions: string formatting, DateTime math, LINQ edge cases.
Yes — programs run against a real terminal session, so Console.ReadLine() blocks mid-execution until you respond, and multiple sequential prompts work naturally. That includes reading loops that consume lines until empty input, a pattern common in coding-challenge templates.
They do — that's the point of this runtime versus the Mono-based C# page. You can write a program as bare statements, use records, pattern matching, target-typed new, and interpolated strings. If a brand-new preview feature fails to compile, the error message will name the language version in use.
No package restore happens in the sandbox, so NuGet libraries and ASP.NET project templates are out of scope — this is a single-file console environment. The base class library is fully present, though: collections, LINQ, System.Text.Json, regex, and async primitives cover most practice scenarios.
main.cstext/x-csharpConsole.ReadLine()using System;
class Program {
static void Main() {
Console.WriteLine("Hello from C#.NET!");
}
}
Compiler banner lines from the .NET SDK (restore progress, build summary, elapsed time) are stripped so the pane shows program output only.