I\'m interested if there is a way, in LINQ, to check if all numbers in a list are increasing monotonically?
Example
List l
If you want to check whether a list always is increasing from index to index:
IEnumerable list = new List() { 1, 2, 3, 4, 5, 6, 7, 10 };
bool allIncreasing = !list
.Where((i, index) => index > 0 && list.ElementAt(index - 1) >= i)
.Any();
Demo
But in my opinion a simple loop would be more readable in this case.