fork(7) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var s = "2;1;1;1;1;1;5;1;1;1;1;0;1;1;1;1;1;1;1;1;1;0;1;3;17";
  9. var result = s.Split(';').Skip(1).Take(1).FirstOrDefault();
  10. Console.WriteLine(result);
  11. var chunks = s.Split(';');
  12. if (chunks.GetLength(0) > 1)
  13. {
  14. Console.WriteLine(chunks[1]);
  15. }
  16. }
  17. }
Success #stdin #stdout 0.01s 131648KB
stdin
Standard input is empty
stdout
1
1