Chapter 2. Expressions and Control Structures


At the core of every language is the ability to perform two different types of tasks: repetition and conditional logic. Repetition involves using language constructs called loops to perform the same task multiple times. Conditional logic involves writing code that will only execute certain code based on specified conditions. This chapter introduces you to the basics of how to accomplish both of these types of tasks using the C# language.

If you have any familiarity with programming languages at all, the concepts discussed in this chapter should seem familiar and will be easy for you to pick up the C# syntax. If you have already ...

Get Microsoft® Visual C# 2005 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.