- An Abstract class cannot be instantiated.
{
...
}
SampleAbs instance = new SampleAbs(); // Compile Error
- It cannot be modified with the 'sealed' modifier. In other words, an Abstract Class should be inherited.
- An Abstract class may contain abstract as well as non abstract members.
Abstract Methods
- An Abstract method cannot contain a method body.
{
abstract void AbsMethod(); // Legal
abstract void AbsMethod()
{
... // Illegal
}
}
- An abstract method is implicitly a virtual method.
- An Abstract method can only be added in an Abstract Class.
No comments:
Post a Comment