Professional Documents
Culture Documents
Resumen - OOP - r1
Resumen - OOP - r1
Class
Class acts as a template for an object
Class constructor
The new keyword creates a new instance of the class you specify.
o CupOfCoffee myCup = new CupOfCoffee();
Calls code within the .NET Runtime that creates new instance if the type, and hands you back a
reference
Code inside the class that runs as class is created is called the constructor
o .NET Runtime executes code within the class that causes the object to load into memory