fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class Program
  5. {
  6. static void Main(string[] args)
  7. {
  8. string someVariable = string.Empty;
  9.  
  10. Dictionary<string, Action<string>> map = new Dictionary<string, Action<string>>();
  11.  
  12. map.Add("someText", (input) => someVariable = input);
  13.  
  14. map["someText"]("someInput");
  15.  
  16. Console.WriteLine(someVariable);
  17. }
  18. }
  19.  
  20.  
  21.  
Success #stdin #stdout 0.04s 23920KB
stdin
Standard input is empty
stdout
someInput