Object Oriented Programming

Instantiation in C#

Instantiation is used to create an object from a class (instantiate).

objectName = new className(parameters);


Input requirements are taken from the constructor. A class can have multiple constructors with different numbers of input parameters and types, to create different objects.

An instance of a class is called an object.

myCar = new Car ("Honda");

Add to Slack

< Constructor   |   Interfaces >

© 2019 SyntaxDB. All Rights Reserved.