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