Statements are program instructions. Except as described, statements are executed in sequence. C# has the following categories of statements.
Category | C# keywords |
---|---|
Selection statements | if, else, switch, case |
Iteration statements | do, for, foreach, in, while |
Jump statements | break, continue, default, goto, return |
Exception handling statements | throw, try-catch, try-finally |
Checked and unchecked | checked, unchecked |
Unsafe and Fixed | fixed, unsafe |
lock Statement | lock |