Variables, Variables, Variables
Variables, Variables, Variables
Variables, Variables, Variables
Am I old?
What did you think I would do at this moment?
Ahem, I mean, what is a variable?
From: Wikipedia:
In computer programming, a variable is an abstract storage location paired with an associated symbolic name, which contains some known or unknown quantity of data or object referred to as a value ; or in simpler terms, a variable is a named container for a particular set of bits or type of data (like integer, float, string etc…)
Or in even simpler terms:
A variable, for our purposes, is a name we use to represent a value, or an object, or some other abstract thing.
//Structure:
//[VariableType] [VariableName](the actual variable) = [VariableValue];
//This is a variable (a string)
string aString = "Hello";
//These are variables too:
//Boolean (true / false, 1 / 0)
bool bandersonIsCranky = true;
//Int32 (-2,147,483,648 to +2,147,483,647)
int x = 8675309;
//dynamic object (an empty one)
var o = new {};
//An object (DataSet)
DataSet ds = new DataSet("MarkWonsilIsAUnicorn");
etc, etc, etc