I defined a list of rectangles called enemies, and I'm trying to move through the rectangles in the list and decrement their X value, but I am getting an error "cannot modify 'i' because it is a foreach iteration variable." I'm wondering what is wrong with this and if there is a correct way of going about it.
foreach (Rectangle i in enemies)
{
i.X --:
}
Rectange(which is a Struct) as opposed to the WPF Rectangle class, so I added xna as a tag.