1 // CS1654: Cannot assign to members of `p' because it is a `foreach iteration variable'
2 // Line: 14
3 
4 using System.Collections;
5 
6 struct P {
7 	public int x { get; set; }
8 }
9 
10 class Test {
Foo(IEnumerable f)11 	static void Foo (IEnumerable f)
12 	{
13 		foreach (P p in f)
14 			p.x += 2;
15 	}
16 }
17