© Radek Vystavěl 2017

Radek Vystavěl, C# Programming for Absolute Beginners, https://doi.org/10.1007/978-1-4842-3318-4_4

4. Using Variables

Radek Vystavěl

(1)Ondřjov, Czech Republic

In this chapter, you will learn all about variables. A variable is a named place in the computer’s memory where a program can store something. It can be anything you want. In fact, you can have as many variables in your program as you need.

This chapter will start with some simple examples, but eventually you will see that variables are absolutely fundamental to programming.

Storing Text

The first task will introduce you to variables. You will learn how to perform some basic operations with them.

Task

You’ll create a variable named message. Afterward, you will store some ...

Get C# Programming for Absolute Beginners 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.