JetBrains Rider 2026.1 Help

Code inspection: Remove ToList()

Materializing a sequence into a list and then immediately converting that list to an array does extra work without changing the result.

Example

var array = source.ToList().ToArray();
var array = source.ToArray();

Quick-fix

Remove the unnecessary ToList() call.

29 March 2026