Expressions and Control Structures
The goal with any programming language is to implement application logic in order to achieve the desired functionality. C# is a modern language that offers traditional expressions and control structures along with a few new ones to simplify the development process. In addition, C# is a type-safe language and enforces type safety at various levels. Such adherence to type safety is both a blessing and a curse. Depending on the language you're familiar with, some of your old habits will cause you a lot of frustration with C# because it enforces correct code and type safety. The purpose of this chapter is to explore the type safety offered by C# while delving into the expression syntax and control structures offered by the language.