fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var array = new[] { 9, 8, 3, 2, 3, 2 };
  9. var next = array.SkipWhile(n => n != 8).Skip(1).First();
  10. Console.WriteLine(next);
  11. }
  12. }
Success #stdin #stdout 0.04s 23968KB
stdin
Standard input is empty
stdout
3