Tuesday, November 18, 2008

Limitations of Abstract Class and Abstract method

  • Abstract class cannot be a sealed class.
  • Declaration of abstract methods are only allowed in abstract classes.
  • An abstract method cannot be private.
  • The access modifier of the abstract method should be same in both the abstract class and its derived class. If you declare an abstract method as protected, it should be protected in its derived class. Otherwise, the compiler will raise an error.
  • An abstract method cannot have the modifier virtual. Because an abstract method is implicitly virtual.
  • An abstract member cannot be static.

No comments: