O'Reilly logo

Computing with C# and the .NET Framework, 2nd Edition by Gittleman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2 C# Programming Basics

2.1 Variables

2.2 Assignment

2.3 Input and Output

2.4 Arithmetic Expressions

2.5 Methods and Parameters

I n this chapter we will learn about the basic elements of a simple C# program. We use integer values and variables to represent storage locations. Identifiers name variables and other program elements. The assignment statement lets us assign a value to a variable. Expressions compute values. We study arithmetic expressions built using arithmetic operators. Precedence rules permit less use of parentheses in expressions. Input and output methods communicate between the user and the computer. A method implements a computation or an action. We learn to create our own methods, passing parameters and returning values.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required