Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

difference between while and do while in c#

Iteration statements allow the set of instructions to execute repeatedly till
the condition doesn’t turn out false.The Iteration statements in C++ and Java 
are, for loop, while loop and do while loop. These statements are commonly
called loops.Here, the main difference between a while loop and do while loop 
is that while loop check condition before iteration of the loop.On the other 
hand, the do-while loop verifies the condition after the execution of the 
statements inside the loop.Furthermore, the while loop is known as the 
entry-controlled loop.Conversely, the do while loop is called the exit 
controlled loop. In this article, we are going to discuss the differences 
between “while” loop and “do-while” loop.
 
PREVIOUS NEXT
Tagged: #difference
ADD COMMENT
Topic
Name
4+3 =