Run ❯
Get your
own C#
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
using System; using System.Collections.Generic; namespace MyApplication { class Program { static void Main(string[] args) { string text = "hello"; Dictionary
counts = new Dictionary
(); foreach (char c in text) { if (counts.ContainsKey(c)) { counts[c]++; } else { counts[c] = 1; } } foreach (KeyValuePair
item in counts) { Console.WriteLine(item.Key + ": " + item.Value); } } } }
h: 1
e: 1
l: 2
o: 1