filmov
tv
Abstract Class in C# and WHY you need to LEARN this
![preview_player](https://i.ytimg.com/vi/dkFYUUWdQYI/maxresdefault.jpg)
Показать описание
Here are the links by the way!
This is going to be the first tutorial in a series of tutorials we are going to cover for all the keywords in C#!
So let's get started!
The first keyword that we will be covering is abstract
The `abstract` modifier indicates that the thing being modified has a missing or incomplete implementation.
The abstract modifier can be used with classes, methods, properties, indexers, and events.
For example, we can use the abstract modifier in a class declaration to indicate that a class is intended only to be a base class of other classes, not instantiated on its own. Members marked as abstract must be implemented by non-abstract classes that derive from the abstract class.
Few things to note about abstract classes.
- An abstract class cannot be instantiated.
- It is not possible to modify an abstract class with the [sealed] Modifier.
Because the two modifiers have opposite meanings. The `sealed` modifier prevents a class from being inherited and the `abstract` modifier requires a class to be inherited.
There is more to know about abstract classes, of course, check out our C# Masterclass to learn more!
#cshart #programming #tutorial
tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.
Комментарии