using System;
using System.Collections.Generic;

namespace MyCompiler {
    class Program {
        public static void Main(string[] args) {
            Console.WriteLine("Hello world!");
            getString("Saurabh");
        }
        
        public static void getString(string str){
            Dictionary<char,int> dict = new Dictionary<char,int>();
            
            foreach(var character in str){
                if(character != ' '){
                    if(!dict.ContainsKey(character)){
                        dict.Add(character,1);
                    }
                    else{
                        dict[character]++;
                    }
                }
            }
            
            foreach(var dictItem in dict){
                Console.WriteLine("{0} - {1}", dictItem.Key, dictItem.Value);
            }
        }
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: