ECMA-334: 12.3.3.16 Foreach statements
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
12.3.3.16 Foreach statements
For a foreach statement stmt of the form:
foreach (type identifierinexpr)embedded-statement
- The definite assignment state of v at the beginning of expr is the same as the state of v at the beginning of stmt.
- The definite assignment state of v on the control flow transfer to embedded-statement or to the end point of stmt is the same as the state of v at the end of expr.