fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var a = new[]
  10. {
  11. "1,2,3",
  12. "4,5",
  13. "6"
  14. };
  15.  
  16. var b = a.SelectMany(x => x.Split(',')).ToArray();
  17.  
  18. foreach (string s in b)
  19. Console.WriteLine(s);
  20. }
  21. }
Success #stdin #stdout 0.03s 33984KB
stdin
Standard input is empty
stdout
1
2
3
4
5
6