TechTips .NET/ CSLA.NET / ASP.NET / VB.NET / C# / SQL Server / MySql / Android
  • Oct
    12

    Few facts about Abstract Classes (C#)

    Filed under: .NET, C#, Technical, VB.NET;

     

    Hi friends.. sometime back I had a discussion with few of my friends on different topics on OOPS. Just thought to put a post of some of the important facts which might help others as well.  Starting with Abstract classes. Will be writing on more topics in next posts.
    Abstract Classes

    1. Abstract classes can have a non abstract ctor and they can’t be instantiated.
    2. Since abstract classes can’t be instantiated one should not use Public and Protected Internal modifier with Abstract class Ctor.
    3. Abstract class can be derived from a concrete class.
    4. Abstract class can have non abstract members (methods, events, properties) but non abstract class can’t have abstract members.
    5. An abstract class may contain abstract methods and accessors.
    6. An abstract method is implicitly a virtual method.
    7. Static and Virtual modifiers can’t be used with abstract methods
    8. An abstract inherited property can be overridden in a derived class by including a property declaration that uses the override modifier.
    9. Abstract classes can have concrete static methods.

    Hope this helps..Please put your comments and any additional info about abstract class which may help others as well.

    No Comments

Leave a reply

Translate

EnglishFrenchGermanHindiItalianPortugueseRussianSpanish
| More