fork download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var list = new List<KeyValuePair<string, object>>();
  9. list.Add(new KeyValuePair<string, object>("string", "Hello, World!"));
  10. list.Add(new KeyValuePair<string, object>("int", 42));
  11. list.Add(new KeyValuePair<string, object>("bool", true));
  12.  
  13. foreach (var item in list)
  14. Console.WriteLine("[{0}] = {1}", item.Key, item.Value);
  15. }
  16. }
Success #stdin #stdout 0.03s 24208KB
stdin
Standard input is empty
stdout
[string] = Hello, World!
[int] = 42
[bool] = True