Results 1 to 3 of 3

Thread: Why we use abstract classs

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    141

    Angry Why we use abstract classs

    Why we use abstract classs
    plz tell me
    difference Abstract class VS Interface

    plzzzzz help me
    Last edited by Waseemalisyed; Nov 17th, 2005 at 06:03 AM. Reason: enhance

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Why we use abstract classs

    An abstract class is one that cannot be instantiated, so it serves only to provide common functionality for derived classes. An interface is similar but a class does not inherit any functionality by implementing an interface. It just guarantees to provide certain functionality itself. When you inherit a class, abstract or not, you automatically inherit all its members with the appropriate access modifiers without any more code, whereas if you implement an interface you have to implement all its members yourself.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Why we use abstract classs

    Quote Originally Posted by MSDN
    Abstract classes have the following features:

    * An abstract class cannot be instantiated.
    * An abstract class may contain abstract methods and accessors.
    * It is not possible to modify an abstract class with the sealed modifier, which means that the class cannot be inherited.
    * A non-abstract class derived from an abstract class must include actual implementations of all inherited abstract methods and accessors.
    http://msdn.microsoft.com/library/de...rfAbstract.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width