What is an Abstract Class?

An abstract class is a special class which cannot be instantiated but it needs to be implemented in the sub class. The methods declared within the class needs to be implemented (in the abstract class we only have the declaration for the method) in the sub class using the "override" keyword. The abstract class or method declared needs to have the keyword "abstract".
  1. An abstract class can inherit from a class and one or more interfaces
  2. An abstract class can implement code with non-Abstract methods
  3. An Abstract class can have modifiers for methods, properties etc
  4. An Abstract class can have constants and fields
  5. An abstract class can implement a property
  6. An abstract class can have constructors or destructors
  7. An abstract class cannot be inherited from by structures
  8. An abstract class cannot support multiple inheritance 

Comments

Popular posts from this blog

jQuery Basics

What is the difference between a Page Layout and Master Page in SharePoint?

Accessing data from SharePoint 2010 to an ASP.NET application