In [[C Sharp Flow Control with if and else|C# Flow Control Using if and else]] we looked at how to control program execution flow using the ''if'' and ''else'' statements. Whilst these statement constructs work well for a testing a limited number of conditions they quickly become unwieldy when dealing with larger numbers of possible conditions. To simplify these situations C# has inherited the ''switch'' statement from the C programming language. In this chapter we will explore the ''switch'' statement in detail.
+
In [[C Sharp Flow Control with if and else|C# Flow Control Using if and else]] we looked at how to control program execution flow using the ''if'' and ''else'' statements. Whilst these statement constructs work well for testing a limited number of conditions they quickly become unwieldy when dealing with larger numbers of possible conditions. To simplify such situations C# has inherited the ''switch'' statement from the C programming language. In this chapter we will explore the ''switch'' statement in detail.