Online C# compiler
Compile and run C# online free, no sign-up: write a program with a Main method, give it input on stdin and see the output, errors and run time.
How do I run C# code online?
This is an online C# compiler: write a class with a static void Main() method, put its input in the Input box and press Run. It is compiled and run on the server, and you see the console output, the compiler's errors or the unhandled exception, and the run time — free, with no sign-up.
How it works
- Write your program. Any class with a static void Main() method is the entry point — the starter calls it Program. Add using System; for Console, and using System.Linq; and using System.Collections.Generic; for LINQ, List<T> and Dictionary<K, V>.
- Give it input. Console.ReadLine() returns one line, or null once the input has run out. Parse values with int.Parse(line), and split a line of numbers with line.Split(' ').Select(int.Parse).ToArray(). Put every line the program reads in the Input box before you run it.
- Run it. Press Run or Ctrl+Enter. You get what the program printed, any compiler or runtime error, and how long it ran. The first run without an account asks a quick check that you are a person.
Who it is for
Anyone writing C# who wants it run now: a student checking a lab program or an exam answer, someone on a machine where nothing can be installed, or a learner trying C# before setting it up.