This page is a work in progress.You can help improve it. →

Terminology

TermDefinition
loopsPerform a task repeatedly or a certain number of times, perform a task repeatedly until a condition is met or to process all of the items in a collection.
while loopWhen executing code that needs to continue running over and over until the condition in the while loop is true. For example: while(reading) {Console.WriteLine("I'm being read")} if reading becomes false there is nothing written to the console.
for loopExecutes a block of statements repeatedly until the specified Condition returns false.
InitializationDo this at the start of the for loop.
ConditionKeep going as long as this is true during the for loop.
AfterthoughtDo this after each loop through the for loop is done.
foreach loopExecutes a block of code on each element in an array or a collection of items.
© 2017 - 2022; Built with ♥ in St. Petersburg, Florida.