Navigation: X# Documentation > X# Compiler Errors and Warnings
Error XS8344
foreach statement cannot operate on enumerators of type '{0}' in async or iterator methods because '{0}' is a ref struct.