Inspectopedia
 
2024.3

Enumeration can be iteration

Warning
New
Last modified: 03 December 2024

Reports calls to Enumeration methods that are used on collections and may be replaced with equivalent Iterator constructs.

Example:

After the quick-fix is applied: