A variable is a storage holder, and is essential for the programmer.
In C#, a variable is declared like this:
Syntax:
- <data type> <name>;
An example could look like this:
- string name;
You can also control the visibility of a variable like this,
- <visibility> <data type> <name> = <value>;
- public string name; //Visible to all
- private string name; //Not visible to all
..