Learn C# (C sharp) in FREE step-by-step lessons.
Module 04: Variables
A variable is a named location in memory. A variable allows us to store data that is input or calculated. Variables can vary, or change.
Goals:
- Declaring and assigning values to variables
Objectives:
- Be able to declare and use variable in code;
- Understand the variable types used in C#;
- Know and use the naming conventions for variables;
- Assign values to variables;
- Understand the scope of a variable.
Please study the material at each of the links below.
Microsoft References: C# Types and Variables- Variables: Variable definition, types, and how to declare variables
- Variable Types: Object types
Drill on type: Self study drill to make sure you understand- Variable Names: Rules and guidelines for naming variables
Drill on Names: Self study drill to make sure you understand- Declaring Variables: Syntax for statement to declare a variable
- Assign a value to a variable: This statement assigns a new value to a variable.
Global Variables: A global variable can be accessed, changed,
or modified anywhere in the program.
Using the local directory: This shows how to store pictures or other files in the local directory
Glossary for variables lesson
Full Glossary