Abstract class in C#

 

//abstract class can contain abstract method but it is not mandatory

using System;


namespace Abstract
{

   public abstract class Customer
    {
        public void Print()
        {
            Console.WriteLine("Print");
        }
    }


    public class Program:Customer
    {
        //public override void Print()
        //{
        //    Console.WriteLine("Print Method");
        //}

        public static void Main(string[] args)
        {

            //Customer c = new Program();
            //c.Print();
            //Console.ReadKey();
        }
    }
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *