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.

  • Declare implicitly typed local variables.

Chapter 1, “Welcome to C#,” introduced how to use the Microsoft Visual Studio 2022 programming environment to build and run a console program and a graphical application. This chapter introduces you to 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 ...

Get Microsoft Visual C# Step by Step, 10th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.