I read on C # arrays, so my question is initially on arrays.
What does an array declaration mean? I know that you are declaring a variable of type array. When I have the following, what actually happens?
int[] values;
Is he in memory at the time of his announcement? If not, where is it? Is the array actually created here?
Then I go and instantiate the array and initialize it with some values, for example:
int[] values = new int[] { 1, 2, 3 };
Is this really happening and now an array is being created? I read that arrays are created when they are declared, others say that arrays are created when they are created. I am trying to get the right terminology.
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 technique behind the scenes of arrays.
source share