concept control flow in category c#

appears as: control flow, control flow, The control flow
C# in Depth, Fourth Edition

This is an excerpt from Manning's book C# in Depth, Fourth Edition.

The whole point of declaring a method with the async modifier is to use await expressions in that method. Everything else about the method looks pretty normal: you can use all kinds of control flow—loops, exceptions, using statements, anything. So where can you use an await expression, and what does it do?

This is nice and simple because you have no loops or try/catch/finally blocks to worry about. The control flow is simple, apart from the awaiting, of course. Let’s see what the compiler generates for this code.

In this section, I’ll show you just two elements of control flow: loops and try/finally statements. This isn’t intended to be comprehensive, but it should give you enough of a glimpse at the control-flow gymnastics the compiler has to perform to help you understand other situations if you need to.