I\'m trying to find a LINQ expression to compare two list elements.
What i want to do is:
List _int = new List { 1, 2, 3, 3, 4,
If you really want to do it with a lambda expression, add a bound check (that either always returns the last element or never, your choice).
An iterative approach would be more readable though, IMO.