ReSharper 2026.1 Help

Code inspection: Multiple sequential 'OrderBy' invocation

This inspection reports multiple sequential OrderBy calls on the same LINQ query. The later OrderBy replaces the previous ordering instead of extending it, so the earlier sort is usually meaningless.

Example

var result = items .OrderBy(x => x.Name) .OrderBy(x => x.Age);
var result = items .OrderBy(x => x.Name) .ThenBy(x => x.Age);

Quick-fix

The quick-fix replaces the later OrderBy with ThenBy so the second sort becomes a secondary ordering.

01 April 2026