instantiation in C#

Status
Not open for further replies.

BioHazard90

Solid State Member
Messages
8
Code:
class MyProgram
{
    static void Main()
    {
        int[] integers;            // declare array
        integers = new int[10];    // size array
    }
}

In which line is the array actually instantiated?
 
Instantiated means an instance of a type has been created. In C#, that is typically accomplished using the 'new' keyword. In your specific case, the second line of code in the Main method instantiates the array.
 
Status
Not open for further replies.
Back
Top Bottom