fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var dict = new Dictionary<string, Action>();
  9.  
  10. dict.Add("hello", test);
  11.  
  12. var input = "hello";
  13. dict[input]();
  14. }
  15.  
  16. public static void test()
  17. {
  18. Console.WriteLine("test");
  19. }
  20. }
Success #stdin #stdout 0.03s 24240KB
stdin
Standard input is empty
stdout
test