Is there any LINQ support for checking if an IEnumerable is sorted? I have an enumerable that I want to verify is sorted in non-descending order, but I
There is no such built-in support.
Obviously if your IEnumerable also implements IOrderedEnumerable then you don't need to do an additional check, otherwise you'd have to implement an extension method like you did.
You might want to add a direction parameter or change its name to IsSortedAscending, by the way. Also, there might be different properties in your T to sort on, so it would have to be obvious to you in some way what "sorted" means.