Skip to content
RapidFinger — free online typing test

Typing tests

← All programming languages

C# Coding Practice

Practice typing real code syntax, including brackets, punctuation, and indentation. Snippets are for typing practice only and are never executed.

Count values in a dictionary

Type the code exactly. Tab inserts four spaces. Code is not executed.

Choose another snippet

Progress: 0%

Current mismatches: 0

using System;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var scores = new Dictionary<string, int>
        {
            ["Ada"] = 92,
            ["Linus"] = 85,
            ["Grace"] = 98
        };

        foreach (var entry in scores)
        {
            Console.WriteLine($"{entry.Key}: {entry.Value}");
        }
    }
}

Type the code exactly, including spaces and indentation.