fork download
  1. using System.IO;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5.  
  6. class Program
  7. {
  8. private const int ListLength = 3;
  9.  
  10. private static readonly Dictionary<string, List<string>> DictData =
  11. new Dictionary<string, List<string>>
  12. {
  13. {
  14. "asf1",
  15. new List<string>
  16. {
  17. "zxcv1",
  18. "zxcv2",
  19. "zxcv3",
  20. }
  21. },
  22. {
  23. "asf2",
  24. new List<string>
  25. {
  26. "qwer1",
  27. "qwer2",
  28. "qwer3",
  29. }
  30. },
  31. };
  32.  
  33. static void Main()
  34. {
  35. string header = string.Join("\t", DictData.Select(di => di.Key));
  36.  
  37. Console.WriteLine(header);
  38. Console.WriteLine("");
  39.  
  40. for (int i = 0; i < ListLength; i++)
  41. {
  42. string row = string.Join("\t", DictData.Select(di => di.Value[i]));
  43.  
  44. Console.WriteLine(row);
  45. }
  46. }
  47. }
  48.  
Success #stdin #stdout 0.01s 131712KB
stdin
Standard input is empty
stdout
asf1	asf2

zxcv1	qwer1
zxcv2	qwer2
zxcv3	qwer3