Changes

Jump to: navigation, search

C Sharp Flow Control with if and else

266 bytes added, 15:08, 22 July 2008
no edit summary
This approach works well for a moderate number of comparisons, but can become cumbersome for a larger volume of expression evaluations. For such situations, the C# ''switch'' statement provides a more flexible and efficient solution. For more details on using the ''switch'' statement read the chapter entitled [[The C Sharp switch Statement|The C# switch Statement]].
 
== Summary ==
 
In this chapter we looked at the use of C# ''if'' statements including if, if ... else and if ... else if ... constructs. In the next chapter of this book we will look at using the C# switch statement as an alternative to more complex if statements.

Navigation menu