Navigation: X# Documentation > X# Compiler Errors and Warnings
Warning XS9064
Cannot assign to '{0}' because it is a '{1}'
This warning occurs when you are assigning a value directly to a foreach loop variable