Navigation: X# Documentation > X# Compiler Errors and Warnings
Error XS1622
Cannot return a value from an iterator. Use the yield return statement to return a value, or yield break to end the iteration.