Chapter 2: Working with Variables, Operators, and Expressions


Chapter 2

Working with Variables, Operators, and Expressions

After completing this chapter, you will be able to:

  • Understand statements, identifiers, and keywords.

  • Use variables to store information.

  • Work with primitive data types.

  • Use arithmetic operators such as the plus sign (+) and the minus sign (–).

  • Increment and decrement variables.

In Chapter 1, “Welcome to C#,” you learned how to use the Microsoft Visual Studio 2005 programming environment to build and run a console program and a Windows Forms application. In this chapter, you'll be introduced to the elements of Microsoft Visual C# syntax and semantics, including statements, keywords, and identifiers. You'll study the primitive types that are built into the C# language and the characteristics of the values that each type holds. You'll also see how to declare and use local variables (variables that exist only within a function or other small section of code), learn about the arithmetic operators that C# provides, learn how to use operators to manipulate values, and learn how to control expressions containing two or more operators.




Microsoft Visual C# 2005 Step by Step
Microsoft® Visual C#® 2005 Step by Step (Step By Step (Microsoft))
ISBN: B002CKYPPM
EAN: N/A
Year: 2005
Pages: 183
Authors: John Sharp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net