Initializer section

This section is executed only once. When the program's control encounters a for loop, the initialization section is triggered. # allows one or more of the following statements in the initializer section of the for loop, separated by a comma:

  • Declaration of the local loop variable. This is not available outside of the loop.
  • An assignment statement.
  • Method invocation.
  • Pre/post increment or decrement.
  • New object creation.
  • Await expression. We will look at this in more detail in the upcoming chapters.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.251.128