|
-
Nov 17th, 2005, 06:02 AM
#1
Thread Starter
Addicted Member
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
-
Nov 17th, 2005, 07:14 AM
#2
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.
-
Nov 17th, 2005, 09:56 AM
#3
Re: Why we use abstract classs
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|