← codetypingtest

C# typing test

C# looks like Java at first glance, but modern C# is lighter: these programs use top-level statements, so simple code doesn't need a class or a Main method around it. You'll still type plenty of PascalCase names like Console.WriteLine, and the braces around each block go on their own lines, in the usual C# style.

Start the C# typing test

What you'll type in C#

Example: FizzBuzz in C#

Thanks to top-level statements, FizzBuzz starts straight at the loop. Notice the opening brace on its own line.

for (int i = 1; i <= 15; i++)
{
    if (i % 15 == 0) Console.WriteLine("FizzBuzz");
    else if (i % 3 == 0) Console.WriteLine("Fizz");
    else if (i % 5 == 0) Console.WriteLine("Buzz");
    else Console.WriteLine(i);
}

Type this program now

Tips for typing C# faster

All 20 C# programs

Every program is real, working C#. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages