using System; using System.Collections.Generic; public class Test { public static void Main() { var dict = new Dictionary(); dict.Add("hello", test); var input = "hello"; dict[input](); } public static void test() { Console.WriteLine("test"); } }