我有串的下面列出將多個列表垂直成一個字符串列表
List<string> List1 = new List<string> { "P1", "P2", "P3" };
List<string> List2 = new List<string> { "Q1", "Q2", "Q3" };
List<string> List3 = new List<string> { "R1", "R2", "R3" };
//........
// Add List1,List2, List3 values Vertically to CombileList
CombineList = { "P1", "Q1", "R1", "P2", "Q2", "R2", "P3", "Q3", "R3" };
我要值到CombineList從所有列表垂直添加,如CombineList所示,可以列出的n個以相同的方式添加到CombineList。
你有試過什麼嗎?使用循環這不應該太難。 – Ivar
這個答案可能是你正在尋找的:http://stackoverflow.com/a/10298725/390819 – GolfWolf
http://stackoverflow.com/questions/40768322/merge-multiple-lists-with-variable-length-popping每個元素 –