I am reading up on c# arrays so my question is initially on arrays.
What does declaring an array actually mean? I know you declare a variable of type array. When I have the following, what is actually happening?
int[] values;
Is it in memory by the time it is declared? If not then where is it? Is the array actually created here?
Then I go and instantiate an the array and initialise it with some values like:
int[] values = new int[] { 1, 2, 3 };
Does this actually go and create the array now? I have read that arrays are created when they are declared, others say that arrays are created when they are instantiated. I am trying to get my terminology right.
The same goes for an integer variable. If I have:
int value;
and
int value = 1;
When is int created? When is it added to memory?
Sorry for the dumb questions. I understand the concept but would like to know the technicallity behind the scenes of arrays.