Back to course

Abstraction and Abstract Classes

C# Zero to Hero: Comprehensive Programming Masterclass

Abstraction

Data abstraction is the process of hiding certain details and showing only essential information to the user.

Abstract Class

  • Cannot be used to create objects.
  • To access it, it must be inherited from another class.

Abstract Method

  • Can only be used in an abstract class.
  • Does not have a body; the body is provided by the derived class. csharp abstract class Animal { public abstract void Sound(); }