Notizen
Interfaces
Inhalt der Notizen (1)
Seite 1
CONCRETE AND ABSTRACT CLASSES
Concrete Classes
A concrete class is just a normal class which can contain fields, properties, and methods. With normal classes, we can create objects to be used for various means.
Abstract Classes
An abstract class is similar to a concrete class but can contain properties or methods which are marked as abstract. This means those class members which have been marked as abstract do not have to declare the implementation, only the declaration.
If we mark methods within an abstract class as abstract then any classes which inherit the base class need also use those methods which have been declared as abstract.
When To Use Abstract Classes
Usually, abstract classes would be used when we want to create a base class and not make it possible to be able to create an instance of those that class.
Informationen
- Beschreibung
- C# Notiz am Interfaces, erstellt von Davie Crellin am 16/10/2017.
- Erstellt von
- Davie Crellin · Okt 2017
- Aktualisiert
- 16 Okt 2017
- Aufrufe
- 0
- Bewertung