fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. enum EnvironmentEnum
  7. {
  8. dev,
  9. uat,
  10. production
  11. }
  12.  
  13. public static void Main()
  14. {
  15. var env = EnvironmentEnum.uat;
  16.  
  17. var path = new Dictionary<EnvironmentEnum, string> {
  18. { EnvironmentEnum.dev, "http://localhost:55793/" },
  19. { EnvironmentEnum.uat, "http://d...content-available-to-author-only...h.com/" },
  20. { EnvironmentEnum.production, "http://y...content-available-to-author-only...h.com/" }
  21. }[env];
  22.  
  23. Console.WriteLine(path);
  24. }
  25. }
Success #stdin #stdout 0.03s 24176KB
stdin
Standard input is empty
stdout
http://d...content-available-to-author-only...h.com/