Chapter 11. Iteration and flow control
This chapter deals with the basic issue of iteration (looping) and flow control in C#.
Like Java
In C#, the while (in while loops), do and while (in do...while loops), and for (in for loops) keywords work in exactly the same way as in Java.
You can break and continue from within loops to terminate iteration prematurely (except that you cannot use them with labels).
Unlike Java
Flow control in C# is very much the same as Java, except for:
Get From Java to C#: A Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.