Code inspection: Return value of iterator is not used
This inspection reports a call to an iterator method whose result is ignored. Iterator methods do not do their work when called. They only run when the returned sequence is actually enumerated.
Example
GetItems();
foreach (var item in GetItems())
{
Use(item);
}
01 April 2026