fork(3) download
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. public class Test
  6. {
  7.  
  8. public static void Main()
  9. {
  10. IEnumerable<int> list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 10, 9 };
  11. bool allIncreasing = !list
  12. .Where((i, index) => index > 0 && list.ElementAt(index - 1) >= i)
  13. .Any();
  14. Console.Write("allIncreasing? " + allIncreasing);
  15. }
  16.  
  17. }
  18.  
Success #stdin #stdout 0.02s 33832KB
stdin
Standard input is empty
stdout
allIncreasing? False