C# Program to Demonstrate the Inheritance of Abstract Classes Last Updated : 23 Nov, 2021 Comments Improve Suggest changes Like Article Like Report Abstraction is the process to hide the internal details and show only the functionality. The abstract keyword is used before the class or method to declare the class or method as abstract. And inheritance is the object-oriented programming methodology by which one class is allowed to inherit the features(fields and methods) of another class. In C#, we can also inherit the abstract class using the : operator. abstract class Abstract_class { // Method declaration for abstract class public abstract void abstract_method(); } class class_name : Abstract_class { // Method definition for abstract method }Approach: Create an abstract class and declare a method inside it using abstract keyword.Create a parent class by overriding the method of an abstract class.Create first child class that inherits the parent class and define a method inside it.Create an object that is "Geeks1 obj = new Geeks1()" for the first child class in the main method.Call all the methods that are declared using obj object.Example: C# // C# program to inherit abstract class. using System; // Abstract class abstract class Abstract_class { // Method Declaration for abstract class public abstract void abstract_method(); } // Parent class class Geeks : Abstract_class { // Method definition for abstract method public override void abstract_method() { Console.WriteLine("Abstract method is called"); } } // First child class extends parent class Geeks1 : Geeks { // Method definition public void method1() { Console.WriteLine("method-1 is called"); } } class GFG{ // Driver code public static void Main(String[] args) { // Create an object Geeks1 obj = new Geeks1(); // Call the methods obj.abstract_method(); obj.method1(); } } Output: Abstract method is called method-1 is called Comment More infoAdvertise with us Next Article C# Program to Demonstrate the Inheritance of Abstract Classes O ojaswilavu8128 Follow Improve Article Tags : C# C# Programs CSharp-Inheritance Similar Reads C# Program to Implement Multiple-Inheritance using Abstract Class and Interface Given multiple inheritance, now our task is to implement multiple inheritance with the help of abstract class and interface. So, before implementation first of all we learn the basic definition of multiple-inheritance, abstract class, and interface. Multiple inheritance: Multiple inheritance is a ty 4 min read C# Program to Check a Specified Class is an Abstract Class or Not Abstraction is the process to hide the internal details and showing only the functionality. The abstract keyword is used before the class or method to declare the class or method as abstract. In this article, we will learn how to check a specified class is an abstract class or not. To do this task w 2 min read C# Program to Check a Class is a Sub-Class of a Specified Class or Not A class is a collection of methods, variables, and objects. A subclass is a class that is extended from the parent class. It should achieve all the properties from the parent class. Its syntax is similar to a class. Using: operator we can create the subclass. We can check the class is a subclass of 2 min read C# Program to Demonstrate Abstract Class with Multiple-level Inheritance Abstract Class is the way to achieve abstraction. It is a special class that never be instantiated directly. This class should contain at least one abstract method in it and mark by abstract keyword in the class definition. The main purpose of this class is to give a blueprint for derived classes an 3 min read C# Program to Inherit an Abstract Class and Interface in the Same Class Abstract Class is the way to achieve abstraction. It is a special class that never be instantiated directly. This class should contain at least one abstract method in it and mark by abstract keyword in the class definition. The main purpose of this class is to give a blueprint for derived classes an 3 min read Like