Merge pull request #4926 from BrzVlad/fix-tls-v5
[mono-project.git] / mcs / errors / cs1656-4.cs
blobe88bfb36444aa6abcda7ce203b832f7c1b4dd6dc
1 // CS1656: Cannot assign to `i' because it is a `foreach iteration variable'
2 // Line: 14
4 using System.Collections;
6 class Test {
7 static IEnumerable foo () { return null; }
9 static void Main ()
11 IEnumerable f = foo ();
12 if (f != null)
13 foreach (int i in f)
14 i = 0;