This documentation is archived and is not being maintained.

5.3.3.9 For statements

Visual Studio .NET 2003

Definite assignment checking for a for statement of the form:

for ( for-initializer ; for-condition ; for-iterator ) embedded-statement

is done as if the statement were written:

{
   for-initializer ;
   while ( for-condition ) {
      embedded-statement ;
      for-iterator ;
   }
}

If the for-condition is omitted from the for statement, then evaluation of definite assignment proceeds as if for-condition were replaced with true in the above expansion.

Show: