JetBrains Rider 2026.1 Help

Code inspection: Replace with single call to Single(..)

This inspection reports a LINQ query that filters with Where(...) and then immediately calls Single(). The same query is shorter and clearer as a single Single(...) call.

Example

var item = items.Where(x => x.IsActive).Single();
var item = items.Single(x => x.IsActive);

Quick-fix

Replace the Where(...).Single() chain with Single(...).

29 March 2026