Run C# online — .NET, C# 12/13/14, in a Firecracker microVM. No install.
C# is Microsoft's cross-platform, statically-typed language and the workhorse of the .NET ecosystem — Unity games, Blazor web apps, enterprise services, cloud functions. Modern C# is fast, expressive, and — since .NET Core — genuinely first-class on Linux.
ls-judge runs C# via the real `dotnet` CLI inside a Firecracker microVM. Choose the language version (12, 13, 14) and get the matching .NET runtime.
Bring a single file (Program.cs) or a multi-file project. Top-level statements work; so does an explicit `Main`. Stdin from the Test panel maps to Console.In.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
using System;
class Solution { static void Main() { int n = int.Parse(Console.ReadLine()!.Trim()); Console.WriteLine(n * 2); } }
21
42