Ways to Call Non-Abstract Method in the Abstract Class

There are different types to call Non-Abstract methods in the Abstract Class. 
 
Following are some ways: 
  1. Create an abstract class like below and add non-abstract method:
    1. public abstract class AbsClass  
    2. {  
    3.    public void display()  
    4.    {  
    5.    }  
    6. }  
    Create a normal class like below:
    1. public class Derived : AbsAnother  
    2. {  
    3. }  
    Now Create an object for Derived class then we can able call the non abstract method of abstract class.
    1. Derived obj = new Derived();  
    2. bj.dislay();  
  2. Create a static method in an abstract class like below:
    1. public abstract class AbsStatic  
    2. {  
    3.    public abstract void Display();  
    4.    public static void GetEmployee()  
    5.    {  
    6.    }  
    7. }  
    And call the method like below:
    1. AbsStatic.GetEmployee();   
Ebook Download
View all
Learn
View all