Lecture overview -- Keyboard shortcut: 'u'  Previous page: Instantiation of classes -- Keyboard shortcut: 'p'  Next page: Initialization of objects -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 25 : 29
Object-oriented Programming in C#
Classes and Objects
Instantiation of classes in C#

C# uses the new operation for dynamic instantiation of classes. Static instantiation cannot be used for classes in C#. As we will see later, static instantiation is used for stucts.

Classes must be instantiated dynamically with use of the new operator

The new operator returns a reference to the new object

/user/normark/oop-csharp-1/sources/c-sharp/point/class/Point.csThe class Point.

/user/normark/oop-csharp-1/sources/c-sharp/point/class/Client.csUse of the class Point in a client class called Application. This program is explained

/user/normark/oop-csharp-1/sources/c-sharp/point/class/outputOutput from the Point client program.

Read more about instantiation of classes in the text book version of this material.