Using C# (or VB.NET) which loop (for loop or do/while loop) should be used when a counter is required?
Does it make a difference if the loop should only iterate a se
for loops consist of the following:
for ( initialization; condition; action )
you don’t need an extra if to check your criteria, what do you think is i < value? it’s nothing more than a criteria.
i < value
i use loops when they fit the problem, there’s no definite answer