An Abstract class is a class that cannot be instantiated. An Abstract keyword enables you to create classes and class members that are incomplete and must be implemented in derived class.
Class can be declared as Abstract by putting Abstract before the class definition.
namespace abstractclass
{ public abstract class a
{
public abstract void m();
}
class Program : a
{
static void Main(string[] args)
{
Console.WriteLine("Hello
In main method");
Console.ReadKey();
}
}
}
using System;
namespace abstractclass
{
public abstract class a
{
public abstract void m();
}
class Program : a
{
public override void m()
{
Console.WriteLine("abstract
class method");
}
static void Main(string[] args)
{
Program
p = new Program();
p.m();
Console.WriteLine("Hello
In main method");
Console.ReadKey();
}
}
}

- Abstract method cannot be declare static and if do so it will generate an error ( reason: because static method cannot be marked as override,abstract or virtual)
- Can not use sealed keyword with Abstract method.
- Abstract class cannot be made private.


Maruthi PalllamalliPosted Dec 16, 2015, 5:37 AM EST
What happen if Abstract class empty ?What we can do with empty abstract class ? I Hope, You can provide incomplete ness to any class not only to an abstract.
Tony YangPosted Nov 24, 2015, 10:57 PM EST
I do not agree with you about that "t consists of at least one member that may be a method or property that has a signature, but doesn't have an implementation or body.".
Kiranteja JallepalliPosted Jul 30, 2015, 8:04 AM EDT
Thank you Rajeesh Menoth
Rajeesh MenothPosted Jul 29, 2015, 11:27 PM EDT
Good Explanation, Thank you sir
Thiru SagadevanPosted May 19, 2015, 10:47 PM EDT
The example you took, to explain was good but the way it was presented was not good. Because of the too much grammatical mistakes, people can not understand it easily.
Santhakumar MunuswamyPosted May 18, 2015, 10:11 AM EDT
Thanks for nice one
Gowtham RajamanickamTOP 100Posted May 18, 2015, 8:40 AM EDT
informative..
Pankaj Kumar ChoudharyTOP 100Posted May 18, 2015, 8:09 AM EDT
Really nice way of explanation sir............
Haribansh Kumar AgrawalPosted May 18, 2015, 5:53 AM EDT
nice explanation Mr. Kirantejja
Abhishek JaiswalPosted May 18, 2015, 5:34 AM EDT
Very well explained and good example. :)