Differentiate between the while and for loop in C#.

The while and for loops are used to execute those units of code that need to be repeatedly executed, unless the result of the specified condition evaluates to false. The only difference between the two is in their syntax. The for loop is distinguished by setting an explicit loop variable.

Tagged . Bookmark the permalink.

Leave a Reply