Variables and Standard Types

What are variables?

Variables are a core concept in all programming languages. They are also known as scalars in some languages. A variable by definition is an identifier pointing to a storage location in memory, which contains its value.

In the interactive example below, we've declared 3 variables, one string, one number and date/time.

 

using System; public class Program...

 

Variable names are used in programming to allow values to be passed around in code whilst being persisted in the application state. Variables can also be changed through the lifetime of your programs.

Page 2 of 17