Statements placed after the return
statement are not executed and is considered as "dead" code. Either adding the return
statement was a mistake or that the code placed after the return
statement wasn't supposed to be there in the first place. Either way, it is recommended that you rectify this immediately.
foreach (var item in items)
{
// ...
return;
// ...
}
foreach (var item in items)
{
// ...
if (!ShouldPick(item))
return;
// ...
}