Chapter 3: Control Statements and Exceptions

In the previous chapter, we discussed data types and operators in C#. In this chapter, we will explore control statements in C#. Control statements allow us to implement conditional execution paths in our code. We will also learn how to implement exception handling, which will help us to handle errors that might occur while executing our application.

In this chapter, we will cover the following concepts:

  • Control statements
  • Exception handling

By the end of this chapter, we will have seen how to implement these statements and clauses practically. Let's look at each of these topics in detail using examples.

Understanding control statements

Control statements allow us to control the flow of execution ...

Get Learn C# Programming 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.